agreement minor fixing

This commit is contained in:
Volkan Şahin 2016-06-30 15:42:01 +03:00
parent e78328c880
commit a7979e6006
2 changed files with 4 additions and 2 deletions

View file

@ -53,6 +53,7 @@ class Agreement:
try:
agreement_path = System.Ahenk.received_dir_path() + Util.generate_uuid()
Util.write_file(agreement_path, content)
Util.set_permission(agreement_path, 777)
command = 'export DISPLAY={0};su - {1} -c \'python3 {2} \"$(cat {3})\" \"{4}\"\''.format(display, username, self.ask_path, agreement_path, title)
result_code, p_out, p_err = Util.execute(command)
pout = str(p_out).replace('\n', '')

View file

@ -3,7 +3,7 @@ import easygui
def ask(content, title):
choice = easygui.ynbox(content, title, ('Evet', 'Hayır'))
choice = easygui.textbox(msg=title, text=content, codebox=0)
if choice:
print('Y')
else:
@ -11,10 +11,11 @@ def ask(content, title):
if __name__ == '__main__':
if len(sys.argv) == 3:
try:
ask(sys.argv[1], sys.argv[2])
except Exception as e:
print(str(e))
else:
print('Argument fault. Check your parameters or content of parameters. Parameters: '+str(sys.argv))
print('Argument fault. Check your parameters or content of parameters. Parameters: ' + str(sys.argv))