From 3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4 Mon Sep 17 00:00:00 2001 From: Christopher Harvey Date: Thu, 1 Jul 2010 19:06:58 -0400 Subject: Some useful print statements, with augtool syntax. --- src/ventoo/main.py | 10 ++++++---- 1 file 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///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 -- cgit v1.2.3-65-gdbad