Permalink
Browse files

fix regression: mysql_fh under --simulate needs to be open in write mode

  • Loading branch information...
1 parent 56fa2b0 commit 67d9b625229a937f326251b229027d86911bcd90 @lirazsiri lirazsiri committed Oct 20, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 mysql.py
View
@@ -577,19 +577,19 @@ def restore(myfs, etc, **kws):
mna = None
if simulate:
- fh = file("/dev/null")
+ mysql_fh = file("/dev/null", "w")
else:
if not MysqlService.is_running():
raise Error("MySQL service not running")
if not MysqlService.is_accessible():
mna = MysqlNoAuth()
- fh = mysql()
+ mysql_fh = mysql()
try:
- fs2mysql(fh, myfs, **kws)
- fh.close()
+ fs2mysql(mysql_fh, myfs, **kws)
+ mysql_fh.close()
finally:
if mna:
mna.stop()

0 comments on commit 67d9b62

Please sign in to comment.