diff --git a/hgtools/managers/reentry.py b/hgtools/managers/reentry.py
index <HASH>..<HASH> 100644
--- a/hgtools/managers/reentry.py
+++ b/hgtools/managers/reentry.py
@@ -31,7 +31,7 @@ def replace_sysargv(params):
 	try:
 		yield
 	finally:
-		sys.argv = sys.argv
+		sys.argv = sys_argv
 
 class Result(object):
 	pass
Fix error in reentry, caught by linter.