core_demo.py 524 Bytes
Newer Older
1
2
#!/usr/bin/python
#
3
# Dummy script to test GetTore's Core module
4
5
#

6
import gettor.core
7
8

try:
9
    core = gettor.core.Core()
10
    links = core.get_links('dummy service', 'linux', 'en')
11
    print links
12
except gettor.core.ConfigError as e:
13
14
15
16
17
18
    print "Misconfiguration: " + str(e)
except gettor.core.UnsupportedOSError as e:
    print "Unsupported OS: " + str(e)
except gettor.core.UnsupportedLocaleError as e:
    print "Unsupported Locale: " + str(e)
except gettor.core.InternalError as e:
19
    print "Internal error: " + str(e)