aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Harvey <chris@basementcode.com>2010-08-04 21:00:09 -0400
committerChristopher Harvey <chris@basementcode.com>2010-08-04 22:12:42 -0400
commit27a96194d691a38edfafdb0512f10456d32ae4e8 (patch)
tree6c347f92d6e34e0002d406319a269ad33adefd6a
parentRemoved straggling obsolite add row code. (diff)
downloadventoo-27a96194d691a38edfafdb0512f10456d32ae4e8.tar.gz
ventoo-27a96194d691a38edfafdb0512f10456d32ae4e8.tar.bz2
ventoo-27a96194d691a38edfafdb0512f10456d32ae4e8.zip
Fixed bug where stale input validation scripts weren't being reloaded.
-rw-r--r--src/ventoo/main.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ventoo/main.py b/src/ventoo/main.py
index b1c8454..0f662a9 100644
--- a/src/ventoo/main.py
+++ b/src/ventoo/main.py
@@ -182,8 +182,17 @@ class MainWindow(gtk.Window):
valScript = self.currentModule.getValidationScript(xmlPath)
if valScript != None:
#There is a script that can validate this input. import and run it.
+ try:
+ os.remove("/tmp/thisCheck.py")
+ except OSError:
+ pass
+ try:
+ os.remove("/tmp/thisCheck.pyc")
+ except OSError:
+ pass
shutil.copyfile(valScript, '/tmp/thisCheck.py')
import thisCheck as validate
+ reload(validate)
valid = validate.validate(text)
if valid:
self.edit_tv.setValid(thisIter)