diff bin/subcomposer @ 911:4b9997ab0e4f

push some logs down to debug. -v flag on SC. another tripleFilter optimization Ignore-this: 41de7e838ff6c775ee4e350f4dfa141d
author Drew Perttula <drewp@bigasterisk.com>
date Mon, 10 Jun 2013 09:58:59 +0000
parents e09e3d1d83d5
children 092c00f6ba25
line wrap: on
line diff
--- a/bin/subcomposer	Mon Jun 10 09:52:15 2013 +0000
+++ b/bin/subcomposer	Mon Jun 10 09:58:59 2013 +0000
@@ -109,9 +109,9 @@
             graph.patchObject(self.session,
                               self.session, L9['currentSub'], newSub.uri)
 
-            with graph.currentState() as current:
-                
-                if newSub and (newSub.uri, RDF.type, L9['LocalSubmaster']) in current:
+            localStmt = (newSub.uri, RDF.type, L9['LocalSubmaster'])
+            with graph.currentState(tripleFilter=localStmt) as current:
+                if newSub and localStmt in current:
                     self._currentChoice(Local)
                 else:
                     # i think right here is the point that the last local
@@ -196,9 +196,13 @@
     parser = OptionParser(usage="%prog [suburi]")
     parser.add_option('--no-geometry', action='store_true',
                       help="don't save/restore window geometry")
+    parser.add_option('-v', action='store_true', help="log debug level")
+
     clientsession.add_option(parser)
     opts, args = parser.parse_args()
 
+    log.setLevel(logging.DEBUG if opts.v else logging.INFO)
+    
     root=tk.Tk()
     root.config(bg='black')
     root.tk_setPalette("#004633")