create_links_demo.py 533 Bytes
Newer Older
ilv's avatar
ilv committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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')
    core.add_link('Github', 'linux', 'es', 
                  'https://foo.bar https://foo.bar.asc 111-222-333-444')
    core.add_link('Github', 'linux', 'es', 
                  'https://foo.bar https://foo.bar.asc 555-666-777-888')
    
except ValueError as e:
    print "Value error: " + str(e)
except RuntimeError as e:
    print "Internal error: " + str(e)