mirror of
https://github.com/kennethreitz/ghsync.git
synced 2026-06-05 15:00:17 +00:00
Merge pull request #7 from pneff/windows
Use subprocess `check_output` to run git
This commit is contained in:
+9
-2
@@ -23,14 +23,21 @@ Inspired by Gisty (http://github.com/swdyh/gisty).
|
||||
|
||||
import os
|
||||
import sys
|
||||
from commands import getoutput as cmd
|
||||
|
||||
from clint import args
|
||||
from clint.textui import puts, colored, indent
|
||||
import requests
|
||||
import json
|
||||
from github2.client import Github
|
||||
|
||||
try:
|
||||
# check_output is new in 2.7.
|
||||
from subprocess import check_output
|
||||
def cmd(command):
|
||||
return check_output(command, shell=True).strip()
|
||||
except ImportError:
|
||||
# commands is deprecated and doesn't work on Windows
|
||||
from commands import getoutput as cmd
|
||||
|
||||
|
||||
__author__ = 'Kenneth Reitz'
|
||||
__license__ = 'ISC'
|
||||
|
||||
Reference in New Issue
Block a user