Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Douglas
slapos.package
Commits
cd0d7240
Commit
cd0d7240
authored
Feb 24, 2014
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[slapos.package] slapos/package/update.py Pyflaked
parent
053ec74a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
8 deletions
+3
-8
slapos/package/update.py
slapos/package/update.py
+3
-8
No files found.
slapos/package/update.py
View file @
cd0d7240
...
...
@@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2012 Vifib SARL and Contributors.
# Copyright (c) 2012
-2014
Vifib SARL and Contributors.
# All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
...
...
@@ -28,14 +28,10 @@
#
##############################################################################
import
ConfigParser
import
datetime
import
logging
from
optparse
import
OptionParser
,
Option
import
os
import
subprocess
as
sub
import
sys
import
tempfile
from
signature
import
Signature
from
base_promise
import
BasePromise
...
...
@@ -98,7 +94,6 @@ class Upgrader:
self
.
logger
.
addHandler
(
ch
)
def
fixConsistency
(
self
,
signature
,
upgrade
=
0
,
reboot
=
0
,
boot
=
0
,
**
kw
):
print
upgrade
,
reboot
,
boot
today
=
datetime
.
date
.
today
().
isoformat
()
if
upgrade
and
boot
:
signature
.
update
(
reboot
=
today
,
upgrade
=
today
)
...
...
@@ -140,7 +135,7 @@ class Upgrader:
if
signature
.
upgrade
>
datetime
.
date
.
today
():
self
.
logger
.
debug
(
"Upgrade will happens on %s"
%
signature
.
upgrade
)
#
return
return
# Check if run for first time
if
signature
.
last_reboot
is
None
:
...
...
@@ -153,7 +148,7 @@ class Upgrader:
if
fixit
:
self
.
fixConsistency
(
signature
,
upgrade
=
1
)
else
:
logger
.
info
(
"Your system is up to date"
)
self
.
logger
.
info
(
"Your system is up to date"
)
if
signature
.
last_reboot
<
signature
.
reboot
:
if
not
self
.
config
.
dry_run
:
...
...
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