Merge pull request #20 from cclauss/patch-1

Catch the throw exception in variable e
pull/21/head
Pavel Loginov 2018-07-05 22:21:13 +06:00 committed by GitHub
commit 2c6eb8d37d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ if serv is not None and form.getvalue('open') is not None:
os.remove(os.path.join(hap_configs_dir, form.getvalue(get)))
file.add(form.getvalue(get) + "<br />")
funct.logging(serv, "delver.py deleted config: %s" % form.getvalue(get))
except OSError:
except OSError as e:
stderr = "Error: %s - %s." % (e.filename,e.strerror)
print('<meta http-equiv="refresh" content="10; url=delver.py?serv=%s&open=open">' % form.getvalue('serv'))
@ -72,4 +72,4 @@ output_from_parsed_template = template.render(h2 = 1, title = "Delete old versio
Select = form.getvalue('del'),
file = file,
token = token)
print(output_from_parsed_template)
print(output_from_parsed_template)