Kaydet (Commit) 823f8947 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Ufak yamalar

üst 31d7ee00
......@@ -80,8 +80,8 @@ class PackageDB(lazydb.LazyDB):
for x in xmlext.getTagByName(doc, "Package"):
name = xmlext.getNodeText(x, "Name")
compressed_data =gzip.zlib.compress(xmlext.toString(x).encode('utf-8'))
pdict[name]= compressed_data
compressed_data = gzip.zlib.compress(xmlext.toString(x).encode('utf-8'))
pdict[name] = compressed_data
return pdict
......
......@@ -266,8 +266,7 @@ class File:
except Exception as e: #FIXME: what exception could we catch here, replace with that.
raise NoSignatureFound(uri)
if os.system('gpg --verify ' + sigfilename) != 0:
raise InvalidSignature(uri)
# everything is all right here
raise InvalidSignature(uri) # everything is all right here
def flush(self):
self.__file__.flush()
......
......@@ -13,6 +13,7 @@
import inary.db
import inary.operations
import inary.blacklist
import inary.context as ctx
def list_needs_restart():
"""
......
......@@ -54,7 +54,7 @@ def sign_data(data, key_file, password_fd):
pipe = subprocess.Popen(command, stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
pipe.stdin.write(data)
pipe.stdin.write(data.encode('utf-8'))
pipe.stdin.close()
# Get signed data
......@@ -401,7 +401,7 @@ def main():
if len(sys.argv[4:]):
# Keep password in a temporary file
password = getpass.getpass()
password_fd = os.tmpfile()
password_fd = open('/tmp/temporary_file_python', 'w')
password_fd.write(password)
password_fd.flush()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment