Bad call to unlink function.

Bug #08835
This commit is contained in:
SNoiraud 2017-09-27 09:40:12 +02:00
parent 4ae5c6477b
commit 84c0d69da2

View File

@ -9,6 +9,7 @@
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2012 Doug Blank
# Copyright (C) 2012-2013 Paul Franklin
# Copyright (C) 2017 Serge Noiraud
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -296,7 +297,7 @@ class ArgParser:
# The file doesn't exists, try to create it.
try:
open(abs_name, 'w').close()
unlink(abs_name)
os.unlink(abs_name)
except OSError as e:
message = _("WARNING: %(strerr)s "
"(errno=%(errno)s):\n"