rsclib 0.67__py3-none-any.whl → 0.68__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rsclib/Config_File.py +15 -11
- rsclib/IP_Address.py +16 -12
- rsclib/Math.py +15 -12
- rsclib/PDF_Signature.py +15 -11
- rsclib/PM_Value.py +15 -11
- rsclib/Phone.py +15 -12
- rsclib/TeX_CSV_Writer.py +15 -11
- rsclib/Version.py +1 -1
- rsclib/ast_call.py +16 -12
- rsclib/ast_cdr.py +16 -12
- rsclib/ast_probe.py +15 -11
- rsclib/base_pickler.py +15 -11
- rsclib/bero.py +15 -11
- rsclib/capacitance.py +15 -11
- rsclib/crm.py +15 -11
- rsclib/execute.py +17 -11
- rsclib/grepmime.py +15 -12
- rsclib/hexdump.py +15 -11
- rsclib/inductance.py +17 -14
- rsclib/isdn.py +16 -12
- rsclib/iter_recipes.py +15 -11
- rsclib/lc_resonator.py +15 -12
- rsclib/nmap.py +16 -12
- rsclib/ocf.py +16 -12
- rsclib/pycompat.py +15 -11
- rsclib/rational.py +15 -11
- rsclib/sqlparser.py +15 -11
- rsclib/stateparser.py +16 -12
- rsclib/timeout.py +15 -12
- rsclib/trafficshape.py +19 -15
- {rsclib-0.67.dist-info → rsclib-0.68.dist-info}/METADATA +15 -5
- rsclib-0.68.dist-info/RECORD +38 -0
- {rsclib-0.67.dist-info → rsclib-0.68.dist-info}/WHEEL +1 -1
- rsclib-0.68.dist-info/licenses/LICENSE +23 -0
- rsclib-0.67.dist-info/RECORD +0 -37
- {rsclib-0.67.dist-info → rsclib-0.68.dist-info}/entry_points.txt +0 -0
- {rsclib-0.67.dist-info → rsclib-0.68.dist-info}/top_level.txt +0 -0
rsclib/execute.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import print_function
|
@@ -112,6 +116,8 @@ class Exec (Log):
|
|
112
116
|
popen_stdin = None
|
113
117
|
if stdin is not None:
|
114
118
|
popen_stdin = PIPE
|
119
|
+
if isinstance (stdin, str):
|
120
|
+
stdin = stdin.encode ('utf-8')
|
115
121
|
p = Popen \
|
116
122
|
( args
|
117
123
|
, stdin = popen_stdin
|
rsclib/grepmime.py
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
#!/usr/bin/python
|
2
|
-
# -*- coding: iso-8859-1 -*-
|
3
2
|
# Copyright (C) 2007-17 Dr. Ralf Schlatterbeck Open Source Consulting.
|
4
3
|
# Reichergasse 131, A-3411 Weidling.
|
5
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
5
|
# All rights reserved
|
7
6
|
# ****************************************************************************
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
12
13
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
17
16
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
21
24
|
# ****************************************************************************
|
22
25
|
|
23
26
|
import re
|
rsclib/hexdump.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import print_function
|
rsclib/inductance.py
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
#!/usr/bin/python
|
2
|
-
# -*- coding: iso-8859-1 -*-
|
3
2
|
# Copyright (C) 2011-17 Dr. Ralf Schlatterbeck Open Source Consulting.
|
4
3
|
# Reichergasse 131, A-3411 Weidling.
|
5
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
5
|
# All rights reserved
|
7
6
|
# ****************************************************************************
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
12
13
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
17
16
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
21
24
|
# ****************************************************************************
|
22
25
|
|
23
26
|
from __future__ import print_function
|
@@ -36,7 +39,7 @@ def L_s (l, d, n) :
|
|
36
39
|
""" Inductance in H for an air-cored cylindrical flat-winded coil
|
37
40
|
of length l and diameter d with n windings. Both l and d are in m.
|
38
41
|
The first publication that tried to give a formula for this type
|
39
|
-
of coils is
|
42
|
+
of coils is
|
40
43
|
Nagaoka, Hantaro (1909-05-06) "The Inductance Coefficients of
|
41
44
|
Solenoids." 27. Journal of the College of Science, Imperial
|
42
45
|
University, Tokyo, Japan. p. 18.
|
@@ -479,7 +482,7 @@ def induction (d, n, d_w, l = 0, pitch = 0, f = 0, material = 'cu') :
|
|
479
482
|
# Single Turn, special handling
|
480
483
|
>>> print ("%3.2f" % (induction (5, 1, 0.0235, 0.0235, f=1.9e6)*1e6))
|
481
484
|
17.10
|
482
|
-
|
485
|
+
|
483
486
|
# From http://www.g3ynh.info/zdocs/comps/part_2.html
|
484
487
|
>>> print ("%3.2f" % (induction (0.06366, 1, 0.00163, 0.00163, f=5e6)*1e9))
|
485
488
|
150.50
|
rsclib/isdn.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import print_function
|
@@ -288,7 +292,7 @@ class ISDN_Port (autosuper) :
|
|
288
292
|
if k [0] != '_' and v is not None
|
289
293
|
)
|
290
294
|
# end def __str__
|
291
|
-
|
295
|
+
|
292
296
|
def __repr__ (self) :
|
293
297
|
return "%s (%s)" % (self.__class__.__name__, str (self))
|
294
298
|
# end def __name__
|
rsclib/iter_recipes.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
# Some recipes for iterating, some from
|
rsclib/lc_resonator.py
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
#!/usr/bin/python
|
2
|
-
# -*- coding: iso-8859-1 -*-
|
3
2
|
# Copyright (C) 2014-17 Dr. Ralf Schlatterbeck Open Source Consulting.
|
4
3
|
# Reichergasse 131, A-3411 Weidling.
|
5
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
5
|
# All rights reserved
|
7
6
|
# ****************************************************************************
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
12
13
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
17
16
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
21
24
|
# ****************************************************************************
|
22
25
|
|
23
26
|
from __future__ import print_function
|
rsclib/nmap.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import print_function
|
@@ -572,7 +576,7 @@ def main () :
|
|
572
576
|
else :
|
573
577
|
for fn in args :
|
574
578
|
p.parse (open (fn))
|
575
|
-
|
579
|
+
|
576
580
|
ip_map = {}
|
577
581
|
for ipname in opt.ip_map :
|
578
582
|
try :
|
rsclib/ocf.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import print_function
|
@@ -134,7 +138,7 @@ class Resource (Exec) :
|
|
134
138
|
OCF_NOT_RUNNING = 7
|
135
139
|
|
136
140
|
ocf_variables = \
|
137
|
-
[ 'OCF_RA_VERSION_MAJOR'
|
141
|
+
[ 'OCF_RA_VERSION_MAJOR'
|
138
142
|
, 'OCF_RA_VERSION_MINOR'
|
139
143
|
, 'OCF_ROOT'
|
140
144
|
, 'OCF_RESOURCE_INSTANCE'
|
rsclib/pycompat.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
#
|
22
26
|
# Python compatibility. Some code taken from Armin Ronacher's excellent
|
rsclib/rational.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import division, print_function
|
rsclib/sqlparser.py
CHANGED
@@ -5,19 +5,23 @@
|
|
5
5
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
6
|
# All rights reserved
|
7
7
|
# ****************************************************************************
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
8
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
9
|
+
# of this software and associated documentation files (the "Software"), to deal
|
10
|
+
# in the Software without restriction, including without limitation the rights
|
11
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
12
|
+
# copies of the Software, and to permit persons to whom the Software is
|
13
|
+
# furnished to do so, subject to the following conditions:
|
12
14
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Library General Public License for more details.
|
15
|
+
# The above copyright notice and this permission notice shall be included in
|
16
|
+
# all copies or substantial portions of the Software.
|
17
17
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
18
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
23
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
24
|
+
# SOFTWARE.
|
21
25
|
# ****************************************************************************
|
22
26
|
|
23
27
|
from __future__ import print_function
|
rsclib/stateparser.py
CHANGED
@@ -4,19 +4,23 @@
|
|
4
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
5
5
|
# All rights reserved
|
6
6
|
# ****************************************************************************
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
11
13
|
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
16
16
|
#
|
17
|
-
#
|
18
|
-
#
|
19
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
20
24
|
# ****************************************************************************
|
21
25
|
|
22
26
|
from __future__ import unicode_literals, print_function
|
@@ -181,7 +185,7 @@ class Parser (Debug, Base_Pickler):
|
|
181
185
|
stack = [s.name for s in self.stack]
|
182
186
|
self.debug (3, "push: %s, stack: %s" % (new_state.name, stack))
|
183
187
|
# end def push
|
184
|
-
|
188
|
+
|
185
189
|
def pop (self, state = None, new_state = None, match = None):
|
186
190
|
self.debug \
|
187
191
|
( 3
|
rsclib/timeout.py
CHANGED
@@ -1,23 +1,26 @@
|
|
1
1
|
#!/usr/bin/python
|
2
|
-
# -*- coding: iso-8859-1 -*-
|
3
2
|
# Copyright (C) 2009-17 Dr. Ralf Schlatterbeck Open Source Consulting.
|
4
3
|
# Reichergasse 131, A-3411 Weidling.
|
5
4
|
# Web: http://www.runtux.com Email: office@runtux.com
|
6
5
|
# All rights reserved
|
7
6
|
# ****************************************************************************
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the "Software"), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
12
13
|
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
-
# GNU Library General Public License for more details.
|
14
|
+
# The above copyright notice and this permission notice shall be included in
|
15
|
+
# all copies or substantial portions of the Software.
|
17
16
|
#
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
17
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
21
24
|
# ****************************************************************************
|
22
25
|
|
23
26
|
import signal
|