Permalink
Browse files

debug output for selector.getprop

  • Loading branch information...
1 parent a33318e commit 33af31038411fffcec9c42b567b277e1418ba692 Alexey Rosolovskiy committed Mar 15, 2013
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/selector.py
View
@@ -9,6 +9,12 @@ def getprop(obj,path,keyErrorAsNone=False):
"""
if '/' not in path:
if keyErrorAsNone:
+ if isinstance(obj, list):
+ f = open('/Users/alexey/Work/ingestion/output.txt', 'w')
+ f.write(path + "\n")
+ f.write(str(obj))
+ f.close()
+ return None
return obj.get(path)
else:
return obj[path]

0 comments on commit 33af310

Please sign in to comment.