##// END OF EJS Templates
install_extension always returns the path to the installed file.
Thomas Kluyver -
Show More
@@ -133,6 +133,8 b' class ExtensionManager(Configurable):'
133 If filename is given, the file will be so named (inside the extension
133 If filename is given, the file will be so named (inside the extension
134 directory). Otherwise, the name from the URL will be used. The file must
134 directory). Otherwise, the name from the URL will be used. The file must
135 have a .py or .zip extension; otherwise, a ValueError will be raised.
135 have a .py or .zip extension; otherwise, a ValueError will be raised.
136
137 Returns the full path to the installed file.
136 """
138 """
137 # Ensure the extension directory exists
139 # Ensure the extension directory exists
138 if not os.path.isdir(self.ipython_extension_dir):
140 if not os.path.isdir(self.ipython_extension_dir):
@@ -151,4 +153,5 b' class ExtensionManager(Configurable):'
151 raise ValueError("The file must have a .py or .zip extension", filename)
153 raise ValueError("The file must have a .py or .zip extension", filename)
152
154
153 filename = os.path.join(self.ipython_extension_dir, filename)
155 filename = os.path.join(self.ipython_extension_dir, filename)
154 return copy(url, filename)
156 copy(url, filename)
157 return filename
@@ -3456,7 +3456,7 b' Defaulting color scheme to \'NoColor\'"""'
3456 """
3456 """
3457 opts, args = self.parse_options(parameter_s, 'n:')
3457 opts, args = self.parse_options(parameter_s, 'n:')
3458 try:
3458 try:
3459 filename, headers = self.extension_manager.install_extension(args, opts.get('n'))
3459 filename = self.extension_manager.install_extension(args, opts.get('n'))
3460 except ValueError as e:
3460 except ValueError as e:
3461 print e
3461 print e
3462 return
3462 return
General Comments 0
You need to be logged in to leave comments. Login now