this part looks sketchy, if it is not executed as root in total:
+ if self.wakecomputer and not isTmpFile:
+ f = tempfile.NamedTemporaryFile()
+ f.write(final_text)
+ f.seek(0)
+ #subprocess.call(['gksudo', '--message', 'testing', 'echo'])
+ subprocess.call(['sudo', 'cp', '--remove-destination', f.name, filename])
+ subprocess.call(['sudo', 'chmod', '700', filename])
+ f.close()
this part looks sketchy, if it is not executed as root in total: NamedTemporaryF ile() call([' gksudo' , '--message', 'testing', 'echo']) call([' sudo', 'cp', '--remove- destination' , f.name, filename]) call([' sudo', 'chmod', '700', filename])
+ if self.wakecomputer and not isTmpFile:
+ f = tempfile.
+ f.write(final_text)
+ f.seek(0)
+ #subprocess.
+ subprocess.
+ subprocess.
+ f.close()