Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
2
Merge Requests
0
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
48fc4f71
authored
Sep 03, 2014
by
Csók Tamás
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
client: few flake8 correction
parent
35d1570e
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
30 deletions
+34
-30
src/iss/installer/cloud.py
+7
-6
src/iss/installer/nxkey.py
+1
-1
src/iss/installer/win_install.py
+3
-2
src/iss/installer/windowsclasses.py
+6
-6
src/python/cloud.py
+7
-6
src/python/nxkey.py
+1
-1
src/python/win_install.py
+3
-2
src/python/windowsclasses.py
+6
-6
No files found.
src/iss/installer/cloud.py
View file @
48fc4f71
...
...
@@ -47,10 +47,10 @@ def parse_arguments():
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
args
=
parser
.
parse_args
()
return
args
...
...
@@ -108,7 +108,7 @@ class Browser:
vm
.
state
,
vm
.
protocol
=
""
,
"NONE"
try
:
while
vm
.
state
.
upper
()[:
3
]
not
in
(
"FUT"
,
"RUN"
):
element
=
WebDriverWait
(
driver
,
7200
)
.
until
(
WebDriverWait
(
driver
,
7200
)
.
until
(
EC
.
presence_of_element_located
((
By
.
CSS_SELECTOR
,
"#vm-details-pw-eye.fa.fa-eye-slash"
)))
...
...
@@ -132,6 +132,7 @@ class Browser:
raise
return
vm
def
main
():
"""
Main program
...
...
@@ -141,7 +142,7 @@ def main():
if
args
.
uri
is
not
None
:
vm
=
Struct
()
vm
.
protocol
,
vm
.
user
,
vm
.
password
,
vm
.
host
,
vm
.
port
=
\
args
.
uri
.
split
(
':'
,
4
)
args
.
uri
.
split
(
':'
,
4
)
vm
.
protocol
=
vm
.
protocol
.
upper
()
vm
.
state
=
"RUN"
else
:
...
...
src/iss/installer/nxkey.py
View file @
48fc4f71
...
...
@@ -136,7 +136,7 @@ class NXKeyGen:
sRet
=
sRet
+
c2
return
escape
(
sRet
)
def
substr_replace
(
self
,
in_str
,
ch
,
pos
,
qt
):
def
substr_replace
(
self
,
in_str
,
ch
,
pos
,
qt
):
"""
Replace a character at a special position
"""
...
...
src/iss/installer/win_install.py
View file @
48fc4f71
...
...
@@ -17,6 +17,7 @@ try:
except
ImportError
:
from
OrderedDict
import
*
# noqa
def
parse_arguments
():
"""
Argument parser, based on argparse module
...
...
@@ -27,8 +28,8 @@ def parse_arguments():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
default
=
"firefox"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
default
=
"firefox"
,
required
=
False
,
choices
=
[
'firefox'
,
'chrome'
,
'iexplore'
,
'opera'
])
if
windowsclasses
.
DecideArchitecture
.
Is64Windows
():
...
...
src/iss/installer/windowsclasses.py
View file @
48fc4f71
...
...
@@ -149,8 +149,8 @@ class RegistryHandler:
temp_dict
,
False
,
architect
,
needed_rights
)
else
:
if
isinstance
(
value
,
list
):
if
len
(
value
)
%
2
!=
0
:
#print "Not enough member in the list"
if
len
(
value
)
%
2
!=
0
:
#
print "Not enough member in the list"
raise
AttributeError
else
:
new_key
=
CreateKeyEx
(
...
...
@@ -173,7 +173,7 @@ class RegistryHandler:
print
"The provided attribute wasn't a dictionary chain"
raise
AttributeError
def
get_key
(
self
,
key_name
,
needed_rights
=
KEY_ALL_ACCESS
):
def
get_key
(
self
,
key_name
,
needed_rights
=
KEY_ALL_ACCESS
):
"""
Getting a registry value by it's key's name
Can raise KeyError if key is not found in the registry
...
...
@@ -234,11 +234,11 @@ class RegistryHandler:
combinations as keys and values
"""
if
depth
==
"key"
:
int_depth
=
0
;
int_depth
=
0
elif
depth
==
"subkeys"
:
int_depth
=
1
;
int_depth
=
1
elif
depth
==
"all"
:
int_depth
=
2
;
int_depth
=
2
else
:
raise
AttributeError
try
:
...
...
src/python/cloud.py
View file @
48fc4f71
...
...
@@ -47,10 +47,10 @@ def parse_arguments():
parser
.
add_argument
(
"-p"
,
"--password"
,
type
=
str
)
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
choices
=
[
'firefox'
,
'chrome'
,
'ie'
,
'opera'
],
default
=
"firefox"
)
args
=
parser
.
parse_args
()
return
args
...
...
@@ -108,7 +108,7 @@ class Browser:
vm
.
state
,
vm
.
protocol
=
""
,
"NONE"
try
:
while
vm
.
state
.
upper
()[:
3
]
not
in
(
"FUT"
,
"RUN"
):
element
=
WebDriverWait
(
driver
,
7200
)
.
until
(
WebDriverWait
(
driver
,
7200
)
.
until
(
EC
.
presence_of_element_located
((
By
.
CSS_SELECTOR
,
"#vm-details-pw-eye.fa.fa-eye-slash"
)))
...
...
@@ -132,6 +132,7 @@ class Browser:
raise
return
vm
def
main
():
"""
Main program
...
...
@@ -141,7 +142,7 @@ def main():
if
args
.
uri
is
not
None
:
vm
=
Struct
()
vm
.
protocol
,
vm
.
user
,
vm
.
password
,
vm
.
host
,
vm
.
port
=
\
args
.
uri
.
split
(
':'
,
4
)
args
.
uri
.
split
(
':'
,
4
)
vm
.
protocol
=
vm
.
protocol
.
upper
()
vm
.
state
=
"RUN"
else
:
...
...
src/python/nxkey.py
View file @
48fc4f71
...
...
@@ -136,7 +136,7 @@ class NXKeyGen:
sRet
=
sRet
+
c2
return
escape
(
sRet
)
def
substr_replace
(
self
,
in_str
,
ch
,
pos
,
qt
):
def
substr_replace
(
self
,
in_str
,
ch
,
pos
,
qt
):
"""
Replace a character at a special position
"""
...
...
src/python/win_install.py
View file @
48fc4f71
...
...
@@ -17,6 +17,7 @@ try:
except
ImportError
:
from
OrderedDict
import
*
# noqa
def
parse_arguments
():
"""
Argument parser, based on argparse module
...
...
@@ -27,8 +28,8 @@ def parse_arguments():
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"-d"
,
"--driver"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
default
=
"firefox"
,
help
=
"Select webdriver. Aside from Firefox, you have to install "
+
"first the proper driver."
,
type
=
str
,
default
=
"firefox"
,
required
=
False
,
choices
=
[
'firefox'
,
'chrome'
,
'iexplore'
,
'opera'
])
if
windowsclasses
.
DecideArchitecture
.
Is64Windows
():
...
...
src/python/windowsclasses.py
View file @
48fc4f71
...
...
@@ -149,8 +149,8 @@ class RegistryHandler:
temp_dict
,
False
,
architect
,
needed_rights
)
else
:
if
isinstance
(
value
,
list
):
if
len
(
value
)
%
2
!=
0
:
#print "Not enough member in the list"
if
len
(
value
)
%
2
!=
0
:
#
print "Not enough member in the list"
raise
AttributeError
else
:
new_key
=
CreateKeyEx
(
...
...
@@ -173,7 +173,7 @@ class RegistryHandler:
print
"The provided attribute wasn't a dictionary chain"
raise
AttributeError
def
get_key
(
self
,
key_name
,
needed_rights
=
KEY_ALL_ACCESS
):
def
get_key
(
self
,
key_name
,
needed_rights
=
KEY_ALL_ACCESS
):
"""
Getting a registry value by it's key's name
Can raise KeyError if key is not found in the registry
...
...
@@ -234,11 +234,11 @@ class RegistryHandler:
combinations as keys and values
"""
if
depth
==
"key"
:
int_depth
=
0
;
int_depth
=
0
elif
depth
==
"subkeys"
:
int_depth
=
1
;
int_depth
=
1
elif
depth
==
"all"
:
int_depth
=
2
;
int_depth
=
2
else
:
raise
AttributeError
try
:
...
...
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