1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-13 17:16:23 +01:00
- other fixes for python26
This commit is contained in:
Marcus Hüwe 2008-09-21 14:44:20 +00:00
parent 35a5c21dab
commit 6ddace8c97
2 changed files with 11 additions and 6 deletions

View File

@ -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:

View File

@ -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)