Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Neil Hanlon
Efs Utils
Commits
1acab15a
Unverified
Commit
1acab15a
authored
Dec 03, 2018
by
Eddie Ramirez
Browse files
fix for additional unexpected arguments
add test for additional unexpected arguments increment version number
parent
78286c54
Changes
6
Hide whitespace changes
Inline
Side-by-side
build-deb.sh
View file @
1acab15a
...
...
@@ -11,7 +11,7 @@ set -ex
BASE_DIR
=
$(
pwd
)
BUILD_ROOT
=
${
BASE_DIR
}
/build/debbuild
VERSION
=
1.
5
VERSION
=
1.
6
echo
'Cleaning deb build workspace'
rm
-rf
${
BUILD_ROOT
}
...
...
dist/amazon-efs-utils.control
View file @
1acab15a
Package: amazon-efs-utils
Architecture: all
Version: 1.
5
Version: 1.
6
Section: utils
Depends: python|python2, nfs-common, stunnel4 (>= 4.56)
Priority: optional
...
...
dist/amazon-efs-utils.spec
View file @
1acab15a
...
...
@@ -20,7 +20,7 @@
%endif
Name : amazon-efs-utils
Version : 1.
5
Version : 1.
6
Release : 1%{?dist}
Summary : This package provides utilities for simplifying the use of EFS file systems
...
...
src/mount_efs/__init__.py
View file @
1acab15a
...
...
@@ -54,7 +54,7 @@ except ImportError:
from
urllib.error
import
URLError
from
urllib.request
import
urlopen
VERSION
=
'1.
5
'
VERSION
=
'1.
6
'
CONFIG_FILE
=
'/etc/amazon/efs/efs-utils.conf'
CONFIG_SECTION
=
'mount'
...
...
@@ -499,8 +499,9 @@ def parse_arguments(config, args=None):
fsname
=
args
[
1
]
if
len
(
args
)
>
2
:
mountpoint
=
args
[
2
]
if
len
(
args
)
>
4
and
args
[
3
]
==
'-o'
:
options
=
parse_options
(
args
[
4
])
if
len
(
args
)
>
4
and
'-o'
in
args
[:
-
1
]:
options_index
=
args
.
index
(
'-o'
)
+
1
options
=
parse_options
(
args
[
options_index
])
if
not
fsname
or
not
mountpoint
:
usage
(
out
=
sys
.
stderr
)
...
...
src/watchdog/__init__.py
View file @
1acab15a
...
...
@@ -25,7 +25,7 @@ try:
except
ImportError
:
from
configparser
import
ConfigParser
VERSION
=
'1.
5
'
VERSION
=
'1.
6
'
CONFIG_FILE
=
'/etc/amazon/efs/efs-utils.conf'
CONFIG_SECTION
=
'mount-watchdog'
...
...
test/mount_efs_test/test_parse_arguments.py
View file @
1acab15a
...
...
@@ -77,6 +77,16 @@ def test_parse_arguments_custom_path():
assert
{}
==
options
def
test_parse_arguments_verbose
():
fsid
,
path
,
mountpoint
,
options
=
mount_efs
.
parse_arguments
(
None
,
[
'mount'
,
'fs-deadbeef:/home'
,
'/dir'
,
'-v'
,
'-o'
,
'foo,bar=baz,quux'
])
assert
'fs-deadbeef'
==
fsid
assert
'/home'
==
path
assert
'/dir'
==
mountpoint
assert
{
'foo'
:
None
,
'bar'
:
'baz'
,
'quux'
:
None
}
==
options
def
test_parse_arguments
():
fsid
,
path
,
mountpoint
,
options
=
mount_efs
.
parse_arguments
(
None
,
[
'mount'
,
'fs-deadbeef:/home'
,
'/dir'
,
'-o'
,
'foo,bar=baz,quux'
])
...
...
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