Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
5bfe7a2d
authored
Sep 02, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update requirements on startup
parent
0f70eb27
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
agent.py
+8
-5
No files found.
agent.py
View file @
5bfe7a2d
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
from
os
import
mkdir
,
environ
,
chdir
import
subprocess
import
sys
chdir
(
sys
.
path
[
0
])
subprocess
.
call
((
'pip'
,
'install'
,
'-r'
,
'requirements.txt'
))
from
twisted.internet
import
reactor
,
defer
from
twisted.internet
import
reactor
,
defer
from
twisted.internet.task
import
LoopingCall
from
twisted.internet.task
import
LoopingCall
from
twisted.internet.serialport
import
SerialPort
from
twisted.internet.serialport
import
SerialPort
import
uptime
import
uptime
import
logging
import
logging
import
subprocess
import
fileinput
import
fileinput
import
platform
import
platform
import
sys
import
tarfile
import
tarfile
from
os.path
import
expanduser
,
join
,
exists
from
os.path
import
expanduser
,
join
,
exists
from
os
import
mkdir
,
environ
,
chdir
from
glob
import
glob
from
glob
import
glob
from
inspect
import
getargspec
,
isfunction
from
inspect
import
getargspec
,
isfunction
from
StringIO
import
StringIO
from
StringIO
import
StringIO
...
@@ -268,8 +273,6 @@ class Context(object):
...
@@ -268,8 +273,6 @@ class Context(object):
rmtree
(
old_dir
,
ignore_errors
=
True
)
rmtree
(
old_dir
,
ignore_errors
=
True
)
move
(
cur_dir
,
old_dir
)
move
(
cur_dir
,
old_dir
)
move
(
new_dir
,
cur_dir
)
move
(
new_dir
,
cur_dir
)
chdir
(
cur_dir
)
subprocess
.
call
((
'pip'
,
'install'
,
'-r'
,
'requirements.txt'
))
logger
.
info
(
'Updated'
)
logger
.
info
(
'Updated'
)
reactor
.
stop
()
reactor
.
stop
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment