Permalink
Browse files

map() acts different in py3.x

  • Loading branch information...
1 parent dd04678 commit 3229ec3530cf0c8b6677edd906e27b859127f31e @qwcode committed Dec 7, 2012
Showing with 8 additions and 2 deletions.
  1. +4 −1 pip/basecommand.py
  2. +4 −1 pip/baseparser.py
View
@@ -38,7 +38,10 @@ def __init__(self):
'name' : self.name,
}
self.parser = ConfigOptionParser(**parser_kw)
- map(self.parser.add_option, base_options)
+ #map() behaves differently in py3x
+ #map(self.parser.add_option, base_options)
+ for option in base_options:
+ self.parser.add_option(option)
def merge_options(self, initial_options, options):
# Make sure we have all global options carried over
View
@@ -308,7 +308,10 @@ def create_main_parser():
action='store_true',
help='Show help')
- map(parser.add_option, base_options)
+ #map() behaves differently in py3x
+ #map(parser.add_option, base_options)
+ for option in base_options:
+ parser.add_option(option)
return parser

0 comments on commit 3229ec3

Please sign in to comment.