mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 17:16:23 +01:00
parent
35a5c21dab
commit
6ddace8c97
@ -271,8 +271,8 @@ class RawCmdln(cmd.Cmd):
|
||||
|
||||
Returns the return value from the command handler.
|
||||
"""
|
||||
assert (isinstance(argv, (list, tuple)),
|
||||
"'argv' is not a sequence: %r" % argv)
|
||||
assert isinstance(argv, (list, tuple)), \
|
||||
"'argv' is not a sequence: %r" % argv
|
||||
retval = None
|
||||
try:
|
||||
argv = self.precmd(argv)
|
||||
@ -317,8 +317,8 @@ class RawCmdln(cmd.Cmd):
|
||||
while not self.stop:
|
||||
if self.cmdqueue:
|
||||
argv = self.cmdqueue.pop(0)
|
||||
assert (isinstance(argv, (list, tuple)),
|
||||
"item on 'cmdqueue' is not a sequence: %r" % argv)
|
||||
assert isinstance(argv, (list, tuple)), \
|
||||
"item on 'cmdqueue' is not a sequence: %r" % argv
|
||||
else:
|
||||
if self.use_rawinput:
|
||||
try:
|
||||
|
@ -2091,8 +2091,13 @@ def dgst(file):
|
||||
#if not os.path.exists(file):
|
||||
#return None
|
||||
|
||||
import md5
|
||||
s = md5.new()
|
||||
try:
|
||||
import hashlib
|
||||
md5 = hashlib
|
||||
except ImportError:
|
||||
import md5
|
||||
md5 = md5
|
||||
s = md5.md5()
|
||||
f = open(file, 'r')
|
||||
while 1:
|
||||
buf = f.read(BUFSIZE)
|
||||
|
Loading…
Reference in New Issue
Block a user