Commit dc31d981 authored by Gottfried Gaisbauer's avatar Gottfried Gaisbauer
Browse files

Wrong bracket when checking read inputs

parent ed973147
......@@ -166,13 +166,13 @@ class GivecoinPrinter:
self.check_read_entries(address, privkey, transaction)
# print the first line
self.print_to_banknote_and_eject(privkey, choice)
#self.print_to_banknote_and_eject(privkey, choice)
# rewrite file
self.remove_used_line_from_file(filename, lines)
#self.remove_used_line_from_file(filename, lines)
# write to logfile
self.write_to_logfile(address, privkey, transaction, choice)
#self.write_to_logfile(address, privkey, transaction, choice)
# reads all lines from a givecoin file
def read_all_lines_from_file(self, filename):
......@@ -195,16 +195,16 @@ class GivecoinPrinter:
# checks if the entries has the proper format
def check_read_entries(self, address, privkey, transaction):
if len(address) != 34:
self.message = "Address " + address + " has wrong length. Length is " + str(len(address) + " and should be 34!")
if len(address) > 34:
self.message = "Address " + address + " has wrong length. Length is " + str(len(address)) + " and should less than 34!"
return
if len(privkey) != 52:
self.message = "Private Key " + privkey + " has wrong length. Length is " + str(len(privkey) + " and should be 52!")
self.message = "Private Key " + privkey + " has wrong length. Length is " + str(len(privkey)) + " and should be 52!"
return
if len(transaction) != 65:
self.message = "Transaction " + transaction + " has wrong length. Length is " + str(len(transaction) + " and should be 65!")
self.message = "Transaction " + transaction + " has wrong length. Length is " + str(len(transaction)) + " and should be 65!"
return
# remove the first line, the read line, from file
......
Supports Markdown
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