Pastebin

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
diff --git Allura/allura/ext/admin/admin_main.py Allura/allura/ext/admin/admin_main.py
index 647b454..7d94c09 100644
--- Allura/allura/ext/admin/admin_main.py
+++ Allura/allura/ext/admin/admin_main.py
@@ -27,7 +27,7 @@
 from pylons import tmpl_context as c, app_globals as g
 from pylons import request
 from paste.deploy.converters import asbool, aslist
-from tg import expose, redirect, flash, validate, config, jsonify
+from tg import expose, redirect, flash, validate, config, jsonify, get_flash
 from tg.decorators import with_trailing_slash, without_trailing_slash
 from webob import exc
 from bson import ObjectId
@@ -773,9 +773,9 @@ def install_tool(self, tool=None, mount_point=None, mount_label=None, order=None
             return {'success': False,
                     'info': 'Incorrect tool name, or limit is reached.'
                     }
-        if not h.re_tool_mount_point.match(mount_point) or c.project.app_instance(mount_point) is not None:
+        if c.project.app_instance(mount_point) is not None:
             return {'success': False,
-                    'info': 'Incorrect mount point name, or mount point already exists.'
+                    'info': 'Mount point already exists.',
                     }

         if order is None:
@@ -823,10 +823,16 @@ def install_tool(self, tool=None, mount_point=None, mount_label=None, order=None
             'mount_label': mount_label
         }
         controller._update_mounts(new=data)
-        return {'success': True,
-                'info': 'Tool %s with mount_point %s and mount_label %s was created.'
-                        % (tool, mount_point, mount_label)
-        }
+        error = get_flash()
+        if error:
+            return {'success': False,
+                    'info': error,
+                    }
+        else:
+            return {'success': True,
+                    'info': 'Tool %s with mount_point %s and mount_label %s was created.'
+                            % (tool, mount_point, mount_label)
+            }


 class PermissionsController(BaseController):

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks