Last change
on this file since 230bdca was
445497f,
checked in by Alvaro Neira Ayuso <alvaroneay@…>, 5 years ago
|
Avoid a broken pipe error on opengnsys
|
-
Property mode set to
100644
|
File size:
495 bytes
|
Line | |
---|
1 | from src.ogClient import *
|
---|
2 | from src.ogConfig import *
|
---|
3 | from signal import signal, SIGPIPE, SIG_DFL
|
---|
4 |
|
---|
5 | def main():
|
---|
6 | signal(SIGPIPE, SIG_DFL)
|
---|
7 | ogconfig = ogConfig()
|
---|
8 | if (not ogconfig.parserFile('cfg/ogagent.cfg')):
|
---|
9 | print ('Error: Parsing configuration file')
|
---|
10 | return 0
|
---|
11 |
|
---|
12 | ip = ogconfig.getValueSection('opengnsys', 'ip')
|
---|
13 | port = ogconfig.getValueSection('opengnsys', 'port')
|
---|
14 |
|
---|
15 | client = ogClient(ip, int(port))
|
---|
16 | client.connect()
|
---|
17 | client.run()
|
---|
18 |
|
---|
19 | if __name__ == "__main__":
|
---|
20 | main()
|
---|
Note: See
TracBrowser
for help on using the repository browser.