create_links_demo.py 527 Bytes
Newer Older
ilv's avatar
ilv committed
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/python
#
# Dummy script to test GetTore's Core module progress
#

import gettor

try:
    core = gettor.Core('gettor.cfg')
    core.create_links_file('Github')
ilv's avatar
ilv committed
11
    core.add_link('Github', 'linux', 'es',
ilv's avatar
ilv committed
12
                  'https://foo.bar https://foo.bar.asc 111-222-333-444')
ilv's avatar
ilv committed
13
    core.add_link('Github', 'linux', 'es',
ilv's avatar
ilv committed
14
                  'https://foo.bar https://foo.bar.asc 555-666-777-888')
ilv's avatar
ilv committed
15

ilv's avatar
ilv committed
16
17
18
19
except ValueError as e:
    print "Value error: " + str(e)
except RuntimeError as e:
    print "Internal error: " + str(e)