Skip to content
Browse files

Get rid of generator expressions for Jython 2.2 compat.

  • Loading branch information...
1 parent 7fda9c3 commit def690105fc2c43fb15e6e5ca9884ba747134dbe @spladug committed Mar 25, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 jmxsh.py
View
6 jmxsh.py
@@ -93,10 +93,10 @@ def complete_select(self, text, line, begidx, endidx):
# we are completing the domain portion
pattern = ObjectName(domain + "*:*")
names = self.connection.queryNames(pattern, None)
- return list(set(name.getDomain() + ":" for name in names))
+ return list(set([name.getDomain() + ":" for name in names]))
elif properties[-1][1] is None:
# we are completing a property key
- extant_keys = set(key for key, value in properties if key)
+ extant_keys = set([key for key, value in properties if key])
wildcard_properties = ['%s=%s' % (key, value)
for key, value in properties[:-1]]
@@ -113,7 +113,7 @@ def complete_select(self, text, line, begidx, endidx):
elif properties[-1][0] is not None:
# completing a property value
key = properties[-1][0]
- property_list = ','.join('%s=%s' % (key, value) for key, value in properties)
+ property_list = ','.join(['%s=%s' % (key, value) for key, value in properties])
pattern = ObjectName(domain + ":" + property_list + "*,*")
names = self.connection.queryNames(pattern, None)
return [name.getKeyProperty(key) + "," for name in names]

0 comments on commit def6901

Please sign in to comment.
Something went wrong with that request. Please try again.