supybot-botchk: Use a different method for creating pidfile if it doesn't exist

This commit is contained in:
nyuszika7h 2013-02-03 14:54:07 +01:00
parent 658d0ad84d
commit ff1d9c4f69

View File

@ -97,8 +97,8 @@ if __name__ == '__main__':
parser.error('No conffile given.')
os.chdir(options.botdir)
pidfile = open(options.pidfile, 'ab')
pidfile.close()
if not os.path.exists(options.pidfile):
open(options.pidfile, 'x').close()
pid = None
try: