aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Harvey <chris@basementcode.com>2010-07-01 19:06:58 -0400
committerChristopher Harvey <chris@basementcode.com>2010-07-01 19:06:58 -0400
commit3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4 (patch)
tree647d263417df468cd2d0e6a3883421d51064c2cf
parentConverted some print statements to python 3.1 (diff)
downloadventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.tar.gz
ventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.tar.bz2
ventoo-3e7ba8aa1d2a3e765275d317a7f844a3ebc426e4.zip
Some useful print statements, with augtool syntax.
-rw-r--r--src/ventoo/main.py10
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