# HG changeset patch
# User Goffi <goffi@goffi.org>
# Date 1555222911 -7200
# Node ID 25f14fbd364e1f39199095c9a109591af71fcae4
# Parent  672e6be3290f74afd3378cac59847933fcf17e13
core: added getNamespace method to retrieve a namespace from short name.

diff -r 672e6be3290f -r 25f14fbd364e sat/core/sat_main.py
--- a/sat/core/sat_main.py	Sun Apr 14 08:21:51 2019 +0200
+++ b/sat/core/sat_main.py	Sun Apr 14 08:21:51 2019 +0200
@@ -613,6 +613,13 @@
     def getNamespaces(self):
         return self.ns_map
 
+    def getNamespace(self, short_name):
+        try:
+            return self.ns_map[short_name]
+        except KeyError:
+            raise exceptions.NotFound(u"namespace {short_name} is not registered"
+                                      .format(short_name=short_name))
+
     def getSessionInfos(self, profile_key):
         """compile interesting data on current profile session"""
         client = self.getClient(profile_key)