Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dev committed Jul 19, 2011
1 parent 3ea95c0 commit 9e1987f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sqlgraph/sqlgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def remove_edge(self, fromnode, tonode, cursor=None):

@cursored
def get_node_data(self, node, cursor=None):
result = cursor.execute('select * from %s_nodes where node=?'%self.name, node)
result = cursor.execute('select * from %s_nodes where node=?'%self.name, (node,))
for row in result:
return row[0]
else:
Expand All @@ -87,7 +87,7 @@ def get_edge_data(self, fromnode, tonode, cursor=None):
for row in result:
return row[0]
else:
raise Exception('Node %s is not in graph.' % node)
raise Exception('Edge %s:%s is not in graph.' % (fromnode, tonode))

def from_nx(self, G):
self.name = _encode(G.name)
Expand Down

0 comments on commit 9e1987f

Please sign in to comment.