diff --git a/pip/configuration.py b/pip/configuration.py index 95e455048..da744dc84 100644 --- a/pip/configuration.py +++ b/pip/configuration.py @@ -99,6 +99,9 @@ class Configuration(object): def get_file_to_edit(self): """Returns the file with highest priority in configuration """ + assert self.load_only is not None, \ + "Need to be specified a file to be editing" + try: return self._get_parser_to_modify()[0] except IndexError: