summaryrefslogtreecommitdiff
path: root/pysnmp/entity
diff options
context:
space:
mode:
Diffstat (limited to 'pysnmp/entity')
-rw-r--r--pysnmp/entity/engine.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pysnmp/entity/engine.py b/pysnmp/entity/engine.py
index b480de17..c7a10ebc 100644
--- a/pysnmp/entity/engine.py
+++ b/pysnmp/entity/engine.py
@@ -5,6 +5,7 @@
# License: http://pysnmp.sf.net/license.html
#
import os
+import shutil
import sys
import tempfile
from pyasn1.compat.octets import str2octs
@@ -132,7 +133,7 @@ class SnmpEngine(object):
fd, fn = tempfile.mkstemp(dir=persistentPath)
os.write(fd, str2octs(snmpEngineBoots.syntax.prettyPrint()))
os.close(fd)
- os.rename(fn, f)
+ shutil.move(fn, f)
except Exception:
debug.logger & debug.flagApp and debug.logger(
'SnmpEngine: could not stored SNMP Engine Boots: %s' % sys.exc_info()[1])