Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def iteritems(self):
ah = None
while 1:
try:
ah = gv.agnxtattr(self.ghandle, self.type, ah)
value = gv.agxget(self.handle, ah)
try:
defval = gv.agattrdefval(ah) # default value
if defval == value:
continue # don't report default
except: # no default, gv.getattrdefval raised error
pass
# unique value for this edge
yield (gv.agattrname(ah).decode(self.encoding),
value.decode(self.encoding))
except KeyError: # gv.agxget returned KeyError, skip
continue
except StopIteration: # gv.agnxtattr is done, as are we
return
def iteritems(self):
ah = None
while True:
try:
ah = gv.agnxtattr(self.handle, self.type, ah)
yield (gv.agattrname(ah).decode(self.encoding),
gv.agattrdefval(ah).decode(self.encoding))
except KeyError: # gv.agattrdefval returned KeyError, skip
continue
except StopIteration: # gv.agnxtattr is done, as are we
return
def iteritems(self):
ah=None
while True:
try:
ah=gv.agnxtattr(self.handle,self.type,ah)
yield (gv.agattrname(ah).decode(self.encoding),
gv.agattrdefval(ah).decode(self.encoding))
except KeyError: # gv.agattrdefval returned KeyError, skip
continue
def iteritems(self):
ah=None
while 1:
try:
ah=gv.agnxtattr(self.ghandle,self.type,ah)
value=gv.agxget(self.handle,ah)
try:
defval=gv.agattrdefval(ah) # default value
if defval==value:
continue # don't report default
except: # no default, gv.getattrdefval raised error
pass
# unique value for this edge
yield (gv.agattrname(ah).decode(self.encoding),
value.decode(self.encoding))
except KeyError: # gv.agxget returned KeyError, skip
continue