Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chkcrontab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kevin Lyda
chkcrontab
Commits
7a29880b
Commit
7a29880b
authored
8 years ago
by
Kevin Lyda
Browse files
Options
Downloads
Patches
Plain Diff
Add version info.
parent
ce2732ec
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
chkcrontab
+12
-4
12 additions, 4 deletions
chkcrontab
setup.py
+4
-4
4 additions, 4 deletions
setup.py
with
16 additions
and
8 deletions
chkcrontab
+
12
−
4
View file @
7a29880b
...
...
@@ -31,23 +31,31 @@ import chkcrontab_lib as check
from
optparse
import
OptionParser
from
argparse
import
ArgumentParser
try
:
from
_version
import
__version__
except
ImportError
:
__version__
=
'
unknown
'
def
main
(
argv
):
"""
main program.
"""
parser
=
ArgumentParser
(
description
=
"
Parse crontab files and check each type of line for potential syntax errors.
"
)
description
=
'
Parse crontab files; check for potential syntax errors.
'
,
version
=
__version__
)
parser
.
add_argument
(
'
crontab
'
,
help
=
'
the crontab file to parse
'
)
parser
.
add_argument
(
'
-w
'
,
'
--whitelist
'
,
action
=
'
append
'
,
dest
=
'
whitelisted_users
'
,
help
=
'
A
user to ignore when warning of unrecognized users
This argument
may be passed multiple times
.
'
,
help
=
'
user to ignore when warning of unrecognized users
;
may be passed multiple times
'
,
default
=
[
'
postgres
'
,
'
buildbot
'
])
parser
.
add_argument
(
'
-n
'
,
'
--no-check-passwd
'
,
action
=
'
store_false
'
,
dest
=
'
check_passwd
'
,
help
=
'
D
isable user lookup
'
)
dest
=
'
check_passwd
'
,
help
=
'
d
isable user lookup
'
)
parser
.
add_argument
(
'
-q
'
,
'
--quiet
'
,
action
=
'
store_true
'
,
dest
=
'
quiet
'
,
help
=
"
B
e quiet
"
)
dest
=
'
quiet
'
,
help
=
'
b
e quiet
'
)
args
=
parser
.
parse_args
()
log
=
check
.
LogCounter
()
if
args
.
version
:
print
(
'
Version %s
\n
'
%
__version__
)
return
0
if
not
args
.
quiet
:
print
(
'
Checking correctness of %s
'
%
args
.
crontab
)
return
check
.
check_crontab
(
args
,
log
)
...
...
This diff is collapsed.
Click to expand it.
setup.py
+
4
−
4
View file @
7a29880b
...
...
@@ -26,9 +26,9 @@ from distutils.command.install import install
from
distutils.core
import
setup
from
distutils.core
import
Command
BASE_DIR
=
os
.
path
.
dirname
(
globals
().
get
(
'
__file__
'
,
os
.
getcwd
()))
VERSION
=
os
.
popen2
(
'
git describe --dirty=
"
*
"
--always
'
)[
1
].
readline
().
strip
()
open
(
'
_version.py
'
,
'
w
'
).
write
(
'
__version__ =
"
%s
"
\n
'
%
VERSION
)
class
TestCmd
(
Command
):
description
=
'
Runs all available tests.
'
...
...
@@ -171,13 +171,13 @@ if 'setuptools' not in dir():
setup
(
cmdclass
=
cmdclass
,
name
=
'
chkcrontab
'
,
version
=
'
1.7
'
,
version
=
VERSION
,
url
=
'
http://code.google.com/p/chkcrontab
'
,
author
=
'
Kevin Lyda
'
,
author_email
=
'
lyda@google.com
'
,
description
=
'
A tool to detect crontab errors
'
,
long_description
=
open
(
'
README.rst
'
).
read
(),
py_modules
=
[
'
chkcrontab_lib
'
],
py_modules
=
[
'
chkcrontab_lib
'
,
'
.version
'
],
scripts
=
[
'
chkcrontab
'
],
keywords
=
'
check lint crontab
'
,
# See http://pypi.python.org/pypi?%3Aaction=list_classifiers
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment