mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
Code cleanup
* Streamline variable assignment * Replace assignment with augmented assignment * Remove unused variables and redundant parentheses
This commit is contained in:
parent
47c585d81c
commit
94e8a45c62
11 changed files with 39 additions and 58 deletions
|
@ -115,7 +115,6 @@ class DBConnection(object):
|
||||||
logger.log(u"DB error: " + str(e), logger.ERROR)
|
logger.log(u"DB error: " + str(e), logger.ERROR)
|
||||||
raise
|
raise
|
||||||
except sqlite3.DatabaseError as e:
|
except sqlite3.DatabaseError as e:
|
||||||
sqlResult = []
|
|
||||||
if self.connection:
|
if self.connection:
|
||||||
self.connection.rollback()
|
self.connection.rollback()
|
||||||
logger.log(u"Fatal error executing query: " + str(e), logger.ERROR)
|
logger.log(u"Fatal error executing query: " + str(e), logger.ERROR)
|
||||||
|
|
|
@ -58,7 +58,7 @@ def external_script(outputDestination, torrentName, torrentLabel, settings):
|
||||||
fileName, fileExtension = os.path.splitext(file)
|
fileName, fileExtension = os.path.splitext(file)
|
||||||
|
|
||||||
if fileExtension in core.USER_SCRIPT_MEDIAEXTENSIONS or "ALL" in core.USER_SCRIPT_MEDIAEXTENSIONS:
|
if fileExtension in core.USER_SCRIPT_MEDIAEXTENSIONS or "ALL" in core.USER_SCRIPT_MEDIAEXTENSIONS:
|
||||||
num_files = num_files + 1
|
num_files += 1
|
||||||
if core.USER_SCRIPT_RUNONCE == 1 and num_files > 1: # we have already run once, so just continue to get number of files.
|
if core.USER_SCRIPT_RUNONCE == 1 and num_files > 1: # we have already run once, so just continue to get number of files.
|
||||||
continue
|
continue
|
||||||
command = [core.USER_SCRIPT]
|
command = [core.USER_SCRIPT]
|
||||||
|
@ -103,16 +103,15 @@ def external_script(outputDestination, torrentName, torrentLabel, settings):
|
||||||
except:
|
except:
|
||||||
logger.error("UserScript %s has failed" % (command[0]), "USERSCRIPT")
|
logger.error("UserScript %s has failed" % (command[0]), "USERSCRIPT")
|
||||||
result = int(1)
|
result = int(1)
|
||||||
final_result = final_result + result
|
final_result += result
|
||||||
|
|
||||||
num_files_new = 0
|
num_files_new = 0
|
||||||
for dirpath, dirnames, filenames in os.walk(outputDestination):
|
for dirpath, dirnames, filenames in os.walk(outputDestination):
|
||||||
for file in filenames:
|
for file in filenames:
|
||||||
filePath = core.os.path.join(dirpath, file)
|
|
||||||
fileName, fileExtension = os.path.splitext(file)
|
fileName, fileExtension = os.path.splitext(file)
|
||||||
|
|
||||||
if fileExtension in core.USER_SCRIPT_MEDIAEXTENSIONS or core.USER_SCRIPT_MEDIAEXTENSIONS == "ALL":
|
if fileExtension in core.USER_SCRIPT_MEDIAEXTENSIONS or core.USER_SCRIPT_MEDIAEXTENSIONS == "ALL":
|
||||||
num_files_new = num_files_new + 1
|
num_files_new += 1
|
||||||
|
|
||||||
if core.USER_SCRIPT_CLEAN == int(1) and num_files_new == 0 and final_result == 0:
|
if core.USER_SCRIPT_CLEAN == int(1) and num_files_new == 0 and final_result == 0:
|
||||||
logger.info("All files have been processed. Cleaning outputDirectory %s" % (outputDestination))
|
logger.info("All files have been processed. Cleaning outputDirectory %s" % (outputDestination))
|
||||||
|
|
|
@ -38,7 +38,7 @@ def reportNzb(failure_link, clientAgent):
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
r = requests.post(failure_link, headers=headers, timeout=(30, 300))
|
requests.post(failure_link, headers=headers, timeout=(30, 300))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Unable to open URL %s due to %s" % (failure_link, e))
|
logger.error("Unable to open URL %s due to %s" % (failure_link, e))
|
||||||
return
|
return
|
||||||
|
@ -202,7 +202,7 @@ def is_minSize(inputName, minSize):
|
||||||
|
|
||||||
# audio files we need to check directory size not file size
|
# audio files we need to check directory size not file size
|
||||||
inputSize = os.path.getsize(inputName)
|
inputSize = os.path.getsize(inputName)
|
||||||
if fileExt in (core.AUDIOCONTAINER):
|
if fileExt in core.AUDIOCONTAINER:
|
||||||
try:
|
try:
|
||||||
inputSize = getDirSize(os.path.dirname(inputName))
|
inputSize = getDirSize(os.path.dirname(inputName))
|
||||||
except:
|
except:
|
||||||
|
@ -339,7 +339,7 @@ def rmReadOnly(filename):
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
# check first the read-only attribute
|
# check first the read-only attribute
|
||||||
file_attribute = os.stat(filename)[0]
|
file_attribute = os.stat(filename)[0]
|
||||||
if (not file_attribute & stat.S_IWRITE):
|
if not file_attribute & stat.S_IWRITE:
|
||||||
# File is read-only, so make it writeable
|
# File is read-only, so make it writeable
|
||||||
logger.debug('Read only mode on file ' + filename + ' Will try to make it writeable')
|
logger.debug('Read only mode on file ' + filename + ' Will try to make it writeable')
|
||||||
try:
|
try:
|
||||||
|
@ -631,11 +631,7 @@ def getDirs(section, subsection, link='hard'):
|
||||||
f = guessit.guess_video_info(mediafile)
|
f = guessit.guess_video_info(mediafile)
|
||||||
|
|
||||||
# get title
|
# get title
|
||||||
title = None
|
title = f.get('series') or f.get('title')
|
||||||
try:
|
|
||||||
title = f['series']
|
|
||||||
except:
|
|
||||||
title = f['title']
|
|
||||||
|
|
||||||
if not title:
|
if not title:
|
||||||
title = os.path.splitext(os.path.basename(mediafile))[0]
|
title = os.path.splitext(os.path.basename(mediafile))[0]
|
||||||
|
@ -1262,7 +1258,7 @@ class WindowsProcess(object):
|
||||||
def alreadyrunning(self):
|
def alreadyrunning(self):
|
||||||
self.mutex = self.CreateMutex(None, 0, self.mutexname)
|
self.mutex = self.CreateMutex(None, 0, self.mutexname)
|
||||||
self.lasterror = self.GetLastError()
|
self.lasterror = self.GetLastError()
|
||||||
if (self.lasterror == self.ERROR_ALREADY_EXISTS):
|
if self.lasterror == self.ERROR_ALREADY_EXISTS:
|
||||||
self.CloseHandle(self.mutex)
|
self.CloseHandle(self.mutex)
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -23,7 +23,6 @@ class DelugeClient(object):
|
||||||
self._request_counter = 0
|
self._request_counter = 0
|
||||||
|
|
||||||
def _get_local_auth(self):
|
def _get_local_auth(self):
|
||||||
auth_file = ""
|
|
||||||
username = password = ""
|
username = password = ""
|
||||||
if platform.system() in ('Windows', 'Microsoft'):
|
if platform.system() in ('Windows', 'Microsoft'):
|
||||||
appDataPath = os.environ.get("APPDATA")
|
appDataPath = os.environ.get("APPDATA")
|
||||||
|
@ -62,9 +61,9 @@ class DelugeClient(object):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if username == "localclient":
|
if username == "localclient":
|
||||||
return (username, password)
|
return username, password
|
||||||
|
|
||||||
return ("", "")
|
return "", ""
|
||||||
|
|
||||||
def _create_module_method(self, module, method):
|
def _create_module_method(self, module, method):
|
||||||
fullname = "{0}.{1}".format(module, method)
|
fullname = "{0}.{1}".format(module, method)
|
||||||
|
|
|
@ -10,7 +10,7 @@ class DelugeRPCRequest(object):
|
||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
|
|
||||||
def format(self):
|
def format(self):
|
||||||
return (self.request_id, self.method, self.args, self.kwargs)
|
return self.request_id, self.method, self.args, self.kwargs
|
||||||
|
|
||||||
|
|
||||||
class DelugeRPCResponse(object):
|
class DelugeRPCResponse(object):
|
||||||
|
|
|
@ -126,39 +126,39 @@ def decode_int(x, f):
|
||||||
raise ValueError
|
raise ValueError
|
||||||
elif x[f] == '0' and newf != f + 1:
|
elif x[f] == '0' and newf != f + 1:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
return (n, newf + 1)
|
return n, newf + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_intb(x, f):
|
def decode_intb(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
return (struct.unpack('!b', x[f:f + 1])[0], f + 1)
|
return struct.unpack('!b', x[f:f + 1])[0], f + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_inth(x, f):
|
def decode_inth(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
return (struct.unpack('!h', x[f:f + 2])[0], f + 2)
|
return struct.unpack('!h', x[f:f + 2])[0], f + 2
|
||||||
|
|
||||||
|
|
||||||
def decode_intl(x, f):
|
def decode_intl(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
return (struct.unpack('!l', x[f:f + 4])[0], f + 4)
|
return struct.unpack('!l', x[f:f + 4])[0], f + 4
|
||||||
|
|
||||||
|
|
||||||
def decode_intq(x, f):
|
def decode_intq(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
return (struct.unpack('!q', x[f:f + 8])[0], f + 8)
|
return struct.unpack('!q', x[f:f + 8])[0], f + 8
|
||||||
|
|
||||||
|
|
||||||
def decode_float32(x, f):
|
def decode_float32(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
n = struct.unpack('!f', x[f:f + 4])[0]
|
n = struct.unpack('!f', x[f:f + 4])[0]
|
||||||
return (n, f + 4)
|
return n, f + 4
|
||||||
|
|
||||||
|
|
||||||
def decode_float64(x, f):
|
def decode_float64(x, f):
|
||||||
f += 1
|
f += 1
|
||||||
n = struct.unpack('!d', x[f:f + 8])[0]
|
n = struct.unpack('!d', x[f:f + 8])[0]
|
||||||
return (n, f + 8)
|
return n, f + 8
|
||||||
|
|
||||||
|
|
||||||
def decode_string(x, f):
|
def decode_string(x, f):
|
||||||
|
@ -177,7 +177,7 @@ def decode_string(x, f):
|
||||||
s = t
|
s = t
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
pass
|
pass
|
||||||
return (s, colon + n)
|
return s, colon + n
|
||||||
|
|
||||||
|
|
||||||
def decode_list(x, f):
|
def decode_list(x, f):
|
||||||
|
@ -185,7 +185,7 @@ def decode_list(x, f):
|
||||||
while x[f] != CHR_TERM:
|
while x[f] != CHR_TERM:
|
||||||
v, f = decode_func[x[f]](x, f)
|
v, f = decode_func[x[f]](x, f)
|
||||||
r.append(v)
|
r.append(v)
|
||||||
return (tuple(r), f + 1)
|
return tuple(r), f + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_dict(x, f):
|
def decode_dict(x, f):
|
||||||
|
@ -193,19 +193,19 @@ def decode_dict(x, f):
|
||||||
while x[f] != CHR_TERM:
|
while x[f] != CHR_TERM:
|
||||||
k, f = decode_func[x[f]](x, f)
|
k, f = decode_func[x[f]](x, f)
|
||||||
r[k], f = decode_func[x[f]](x, f)
|
r[k], f = decode_func[x[f]](x, f)
|
||||||
return (r, f + 1)
|
return r, f + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_true(x, f):
|
def decode_true(x, f):
|
||||||
return (True, f + 1)
|
return True, f + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_false(x, f):
|
def decode_false(x, f):
|
||||||
return (False, f + 1)
|
return False, f + 1
|
||||||
|
|
||||||
|
|
||||||
def decode_none(x, f):
|
def decode_none(x, f):
|
||||||
return (None, f + 1)
|
return None, f + 1
|
||||||
|
|
||||||
|
|
||||||
decode_func = {
|
decode_func = {
|
||||||
|
@ -244,7 +244,7 @@ def make_fixed_length_string_decoders():
|
||||||
s = t
|
s = t
|
||||||
except UnicodeDecodeError:
|
except UnicodeDecodeError:
|
||||||
pass
|
pass
|
||||||
return (s, f + 1 + slen)
|
return s, f + 1 + slen
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
@ -262,7 +262,7 @@ def make_fixed_length_list_decoders():
|
||||||
for i in range(slen):
|
for i in range(slen):
|
||||||
v, f = decode_func[x[f]](x, f)
|
v, f = decode_func[x[f]](x, f)
|
||||||
r.append(v)
|
r.append(v)
|
||||||
return (tuple(r), f)
|
return tuple(r), f
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ make_fixed_length_list_decoders()
|
||||||
def make_fixed_length_int_decoders():
|
def make_fixed_length_int_decoders():
|
||||||
def make_decoder(j):
|
def make_decoder(j):
|
||||||
def f(x, f):
|
def f(x, f):
|
||||||
return (j, f + 1)
|
return j, f + 1
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ def make_fixed_length_dict_decoders():
|
||||||
for j in range(slen):
|
for j in range(slen):
|
||||||
k, f = decode_func[x[f]](x, f)
|
k, f = decode_func[x[f]](x, f)
|
||||||
r[k], f = decode_func[x[f]](x, f)
|
r[k], f = decode_func[x[f]](x, f)
|
||||||
return (r, f)
|
return r, f
|
||||||
|
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,6 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
||||||
video_cmd = []
|
video_cmd = []
|
||||||
audio_cmd = []
|
audio_cmd = []
|
||||||
audio_cmd2 = []
|
audio_cmd2 = []
|
||||||
audio_cmd3 = []
|
|
||||||
sub_cmd = []
|
sub_cmd = []
|
||||||
meta_cmd = []
|
meta_cmd = []
|
||||||
other_cmd = []
|
other_cmd = []
|
||||||
|
@ -221,10 +220,6 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
||||||
except:
|
except:
|
||||||
height = 0
|
height = 0
|
||||||
scale = core.VRESOLUTION
|
scale = core.VRESOLUTION
|
||||||
try:
|
|
||||||
framerate = float(fr.split('/')[0]) / float(fr.split('/')[1])
|
|
||||||
except:
|
|
||||||
framerate = 0
|
|
||||||
if codec in core.VCODEC_ALLOW or not core.VCODEC:
|
if codec in core.VCODEC_ALLOW or not core.VCODEC:
|
||||||
video_cmd.extend(['-c:v', 'copy'])
|
video_cmd.extend(['-c:v', 'copy'])
|
||||||
else:
|
else:
|
||||||
|
@ -431,7 +426,6 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
||||||
audio_cmd.extend(audio_cmd3)
|
audio_cmd.extend(audio_cmd3)
|
||||||
|
|
||||||
s_mapped = []
|
s_mapped = []
|
||||||
subs1 = []
|
|
||||||
burnt = 0
|
burnt = 0
|
||||||
n = 0
|
n = 0
|
||||||
for lan in core.SLANGUAGES:
|
for lan in core.SLANGUAGES:
|
||||||
|
@ -587,12 +581,10 @@ def extract_subs(file, newfilePath, bitbucket):
|
||||||
def processList(List, newDir, bitbucket):
|
def processList(List, newDir, bitbucket):
|
||||||
remList = []
|
remList = []
|
||||||
newList = []
|
newList = []
|
||||||
delList = []
|
|
||||||
combine = []
|
combine = []
|
||||||
vtsPath = None
|
vtsPath = None
|
||||||
success = True
|
success = True
|
||||||
for item in List:
|
for item in List:
|
||||||
newfile = None
|
|
||||||
ext = os.path.splitext(item)[1].lower()
|
ext = os.path.splitext(item)[1].lower()
|
||||||
if ext in ['.iso', '.bin', '.img'] and ext not in core.IGNOREEXTENSIONS:
|
if ext in ['.iso', '.bin', '.img'] and ext not in core.IGNOREEXTENSIONS:
|
||||||
logger.debug("Attempting to rip disk image: %s" % (item), "TRANSCODER")
|
logger.debug("Attempting to rip disk image: %s" % (item), "TRANSCODER")
|
||||||
|
@ -647,7 +639,6 @@ def ripISO(item, newDir, bitbucket):
|
||||||
print_cmd(cmd)
|
print_cmd(cmd)
|
||||||
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=bitbucket)
|
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=bitbucket)
|
||||||
out, err = proc.communicate()
|
out, err = proc.communicate()
|
||||||
result = proc.returncode
|
|
||||||
fileList = [re.match(".+(VIDEO_TS[\\\/]VTS_[0-9][0-9]_[0-9].[Vv][Oo][Bb])", line).groups()[0] for line in
|
fileList = [re.match(".+(VIDEO_TS[\\\/]VTS_[0-9][0-9]_[0-9].[Vv][Oo][Bb])", line).groups()[0] for line in
|
||||||
out.splitlines() if re.match(".+VIDEO_TS[\\\/]VTS_[0-9][0-9]_[0-9].[Vv][Oo][Bb]", line)]
|
out.splitlines() if re.match(".+VIDEO_TS[\\\/]VTS_[0-9][0-9]_[0-9].[Vv][Oo][Bb]", line)]
|
||||||
combined = []
|
combined = []
|
||||||
|
|
|
@ -409,11 +409,8 @@ class Client(object):
|
||||||
pass
|
pass
|
||||||
if might_be_base64:
|
if might_be_base64:
|
||||||
torrent_data = torrent
|
torrent_data = torrent
|
||||||
args = {}
|
|
||||||
if torrent_data:
|
args = {'metainfo': torrent_data} if torrent_data else {'filename': torrent}
|
||||||
args = {'metainfo': torrent_data}
|
|
||||||
else:
|
|
||||||
args = {'filename': torrent}
|
|
||||||
for key, value in iteritems(kwargs):
|
for key, value in iteritems(kwargs):
|
||||||
argument = make_rpc_name(key)
|
argument = make_rpc_name(key)
|
||||||
(arg, val) = argument_value_convert('torrent-add', argument, value, self.rpc_version)
|
(arg, val) = argument_value_convert('torrent-add', argument, value, self.rpc_version)
|
||||||
|
@ -804,7 +801,7 @@ class Client(object):
|
||||||
raise ValueError("Target name cannot contain a path delimiter")
|
raise ValueError("Target name cannot contain a path delimiter")
|
||||||
args = {'path': location, 'name': name}
|
args = {'path': location, 'name': name}
|
||||||
result = self._request('torrent-rename-path', args, torrent_id, True, timeout=timeout)
|
result = self._request('torrent-rename-path', args, torrent_id, True, timeout=timeout)
|
||||||
return (result['path'], result['name'])
|
return result['path'], result['name']
|
||||||
|
|
||||||
def queue_top(self, ids, timeout=None):
|
def queue_top(self, ids, timeout=None):
|
||||||
"""Move transfer to the top of the queue."""
|
"""Move transfer to the top of the queue."""
|
||||||
|
|
|
@ -124,7 +124,6 @@ class Torrent(object):
|
||||||
"""
|
"""
|
||||||
Update the torrent data from a Transmission JSON-RPC arguments dictionary
|
Update the torrent data from a Transmission JSON-RPC arguments dictionary
|
||||||
"""
|
"""
|
||||||
fields = None
|
|
||||||
if isinstance(other, dict):
|
if isinstance(other, dict):
|
||||||
for key, value in iteritems(other):
|
for key, value in iteritems(other):
|
||||||
self._fields[key.replace('-', '_')] = Field(value, False)
|
self._fields[key.replace('-', '_')] = Field(value, False)
|
||||||
|
|
|
@ -23,7 +23,7 @@ def format_size(size):
|
||||||
while size >= 1024.0 and i < len(UNITS):
|
while size >= 1024.0 and i < len(UNITS):
|
||||||
i += 1
|
i += 1
|
||||||
size /= 1024.0
|
size /= 1024.0
|
||||||
return (size, UNITS[i])
|
return size, UNITS[i]
|
||||||
|
|
||||||
|
|
||||||
def format_speed(size):
|
def format_speed(size):
|
||||||
|
@ -31,7 +31,7 @@ def format_speed(size):
|
||||||
Format bytes per second speed into IEC prefixes, B/s, KiB/s, MiB/s ...
|
Format bytes per second speed into IEC prefixes, B/s, KiB/s, MiB/s ...
|
||||||
"""
|
"""
|
||||||
(size, unit) = format_size(size)
|
(size, unit) = format_size(size)
|
||||||
return (size, unit + '/s')
|
return size, unit + '/s'
|
||||||
|
|
||||||
|
|
||||||
def format_timedelta(delta):
|
def format_timedelta(delta):
|
||||||
|
@ -91,7 +91,7 @@ def inet_address(address, default_port, default_address='localhost'):
|
||||||
socket.getaddrinfo(addr, port, socket.AF_INET, socket.SOCK_STREAM)
|
socket.getaddrinfo(addr, port, socket.AF_INET, socket.SOCK_STREAM)
|
||||||
except socket.gaierror:
|
except socket.gaierror:
|
||||||
raise INetAddressError('Cannot look up address "%s".' % address)
|
raise INetAddressError('Cannot look up address "%s".' % address)
|
||||||
return (addr, port)
|
return addr, port
|
||||||
|
|
||||||
|
|
||||||
def rpc_bool(arg):
|
def rpc_bool(arg):
|
||||||
|
@ -163,7 +163,7 @@ def argument_value_convert(method, argument, value, rpc_version):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
'Method "%s" Argument "%s" does not exist in version %d.'
|
'Method "%s" Argument "%s" does not exist in version %d.'
|
||||||
% (method, argument, rpc_version))
|
% (method, argument, rpc_version))
|
||||||
return (argument, TR_TYPE_MAP[info[0]](value))
|
return argument, TR_TYPE_MAP[info[0]](value)
|
||||||
else:
|
else:
|
||||||
raise ValueError('Argument "%s" does not exists for method "%s".',
|
raise ValueError('Argument "%s" does not exists for method "%s".',
|
||||||
(argument, method))
|
(argument, method))
|
||||||
|
|
|
@ -159,12 +159,13 @@ class GitUpdateManager(UpdateManager):
|
||||||
|
|
||||||
def _run_git(self, git_path, args):
|
def _run_git(self, git_path, args):
|
||||||
|
|
||||||
output = err = exit_status = None
|
output = None
|
||||||
|
err = None
|
||||||
|
|
||||||
if not git_path:
|
if not git_path:
|
||||||
logger.log(u"No git specified, can't use git commands", logger.DEBUG)
|
logger.log(u"No git specified, can't use git commands", logger.DEBUG)
|
||||||
exit_status = 1
|
exit_status = 1
|
||||||
return (output, err, exit_status)
|
return output, err, exit_status
|
||||||
|
|
||||||
cmd = git_path + ' ' + args
|
cmd = git_path + ' ' + args
|
||||||
|
|
||||||
|
@ -203,7 +204,7 @@ class GitUpdateManager(UpdateManager):
|
||||||
logger.log(cmd + u" returned : " + output + u", treat as error for now", logger.DEBUG)
|
logger.log(cmd + u" returned : " + output + u", treat as error for now", logger.DEBUG)
|
||||||
exit_status = 1
|
exit_status = 1
|
||||||
|
|
||||||
return (output, err, exit_status)
|
return output, err, exit_status
|
||||||
|
|
||||||
def _find_installed_version(self):
|
def _find_installed_version(self):
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue