diff options
author | Christopher Harvey <chris@basementcode.com> | 2010-07-01 19:06:58 -0400 |
---|---|---|
committer | Christopher Harvey <chris@basementcode.com> | 2010-07-01 19:06:58 -0400 |
commit | 3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4 (patch) | |
tree | 647d263417df468cd2d0e6a3883421d51064c2cf | |
parent | Converted some print statements to python 3.1 (diff) | |
download | ventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.tar.gz ventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.tar.bz2 ventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.zip |
Some useful print statements, with augtool syntax.
-rw-r--r-- | src/ventoo/main.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/ventoo/main.py b/src/ventoo/main.py index e0e060d..00a2dee 100644 --- a/src/ventoo/main.py +++ b/src/ventoo/main.py @@ -116,11 +116,12 @@ class MainWindow(gtk.Window): else: augBeforePath = osp.join('files', augeas_utils.stripBothSlashes(self.currentConfigFilePath), augBeforePath) self.a.insert(augBeforePath, re.match('^.+/(.+?)(?:\\[[0-9]+\\])?$', augPath).group(1), False) - #print "insert("+augBeforePath+" "+re.match('^.+/(.+?)(?:\\[[0-9]+\\])?$', augPath).group(1)+")" + print("ins "+re.match('^.+/(.+?)(?:\\[[0-9]+\\])?$', augPath).group(1)+" after "+augBeforePath) self.a.set(augPath, '') + print("set "+augPath+" ''") else: #this row was deleted, update augeas tree in the refresh - #print 'Would remove ' + augPath self.a.remove(augPath) + print('rm ' + augPath) self.refreshAugeasEditTree() """ @@ -165,13 +166,14 @@ class MainWindow(gtk.Window): else: augPath = osp.join('files', augeas_utils.stripBothSlashes(self.currentConfigFilePath), self.edit_tv.get_label_path(thisIter)) enteredValue = model.get_value(thisIter, 2) #get what the user entered. - #print "Setting " + augPath + " = " + enteredValue self.a.set(augPath, enteredValue) + print("set " + augPath + " '" + enteredValue + "'") def diffPressed(self, button, data=None): #show the diff for the current file. try: self.a.save() + print("SAVE") except IOError: pass #TODO: check augeas/files/<file path>/<name>/error @@ -332,8 +334,8 @@ class MainWindow(gtk.Window): p = osp.join(augeasFileRoot, child.tag) if have+numNeeded > 1: p = p + '[' + str(i) + ']' - print('added ' + p + ' to augeas') self.a.set(p, '') + print("set "+p+" ''") toAddtoHave += 1 have += toAddtoHave |