/usr/lib/rads/venv/lib/python3.13/site-packages
NameSizeModeActions
arrow/-0755rm
arrow-1.3.0.dist-info/-0755rm
bakauth/-0755rm
bakauth-1.6.3.dist-info/-0755rm
boto3/-0755rm
boto3-1.40.30.dist-info/-0755rm
botocore/-0755rm
botocore-1.40.30.dist-info/-0755rm
certifi/-0755rm
certifi-2025.8.3.dist-info/-0755rm
charset_normalizer/-0755rm
charset_normalizer-3.4.3.dist-info/-0755rm
cpapis/-0755rm
cpapis-1.0.dist-info/-0755rm
cproc/-0755rm
cproc-1.0.dist-info/-0755rm
dateutil/-0755rm
dateutil-stubs/-0755rm
distro/-0755rm
distro-1.9.0.dist-info/-0755rm
dns/-0755rm
dnspython-2.7.0.dist-info/-0755rm
exim_analytics/-0755rm
exim_analytics-0.1.7.dist-info/-0755rm
idna/-0755rm
idna-3.10.dist-info/-0755rm
iniconfig/-0755rm
iniconfig-2.1.0.dist-info/-0755rm
jmespath/-0755rm
jmespath-1.0.1.dist-info/-0755rm
netaddr/-0755rm
netaddr-1.3.0.dist-info/-0755rm
netifaces-0.11.0.dist-info/-0755rm
packaging/-0755rm
packaging-25.0.dist-info/-0755rm
pip/-0755rm
pip-26.2.1.dist-info/-0755rm
pluggy/-0755rm
pluggy-1.6.0.dist-info/-0755rm
pp_api/-0755rm
pp_api-1.3.1.dist-info/-0755rm
prettytable/-0755rm
prettytable-3.16.0.dist-info/-0755rm
psutil/-0755rm
psutil-7.0.0.dist-info/-0755rm
pygments/-0755rm
pygments-2.19.2.dist-info/-0755rm
pymysql/-0755rm
pymysql-1.1.2.dist-info/-0755rm
pytest/-0755rm
pytest-8.4.2.dist-info/-0755rm
python_crontab-2.7.1.dist-info/-0755rm
python_dateutil-2.9.0.post0.dist-info/-0755rm
PyYAML-6.0.2.dist-info/-0755rm
rads/-0755rm
rads-4.3.2.dist-info/-0755rm
requests/-0755rm
requests-2.32.5.dist-info/-0755rm
restic/-0755rm
restic-1.4.1.dist-info/-0755rm
s3transfer/-0755rm
s3transfer-0.14.0.dist-info/-0755rm
six-1.17.0.dist-info/-0755rm
tabulate/-0755rm
tabulate-0.9.0.dist-info/-0755rm
types_python_dateutil-2.9.0.20250822.dist-info/-0755rm
urllib3/-0755rm
urllib3-2.5.0.dist-info/-0755rm
wcwidth/-0755rm
wcwidth-0.2.13.dist-info/-0755rm
wheel/-0755rm
wheel-0.48.0.dist-info/-0755rm
yaml/-0755rm
_pytest/-0755rm
_yaml/-0755rm
__pycache__/-0755rm
cronlog.py37730644editdlrm
crontab.py468620644editdlrm
crontabs.py44380644editdlrm
netifaces.cpython-313-x86_64-linux-gnu.so276320755editdlrm
py.py3290644editdlrm
six.py347030644editdlrm
Edit: /usr/lib/rads/venv/lib/python3.13/site-packages/crontabs.py (4438B)
# # Copyright 2016, Martin Owens # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3.0 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library. # """ The crontabs manager will list all available crontabs on the system. """ import os import sys import pwd import itertools from os import stat, access, X_OK from pwd import getpwuid from crontab import CronTab class UserSpool(list): """Generates all user crontabs, yields both owned and abandoned tabs""" def __init__(self, loc, tabs=None): for username in self.listdir(loc): tab = self.generate(loc, username) if tab: self.append(tab) if not self: tab = CronTab(user=True) if tab: self.append(tab) def listdir(self, loc): try: return os.listdir(loc) except OSError: return [] def get_owner(self, path): """Returns user file at path""" try: return getpwuid(stat(path).st_uid).pw_name except KeyError: return def generate(self, loc, username): path = os.path.join(loc, username) if username != self.get_owner(path): # Abandoned crontab pool entry! return CronTab(tabfile=path) return CronTab(user=username) class SystemTab(list): """Generates all system tabs""" def __init__(self, loc, tabs=None): if os.path.isdir(loc): for item in os.listdir(loc): if item[0] == '.': continue path = os.path.join(loc, item) self.append(CronTab(user=False, tabfile=path)) elif os.path.isfile(loc): self.append(CronTab(user=False, tabfile=loc)) class AnaCronTab(list): """Attempts to digest anacron entries (if possible)""" def __init__(self, loc, tabs=None): if tabs and os.path.isdir(loc): self.append(CronTab(user=False)) jobs = list(tabs.all.find_command(loc)) if jobs: for item in os.listdir(loc): self.add(loc, item, jobs[0]) jobs[0].delete() def add(self, loc, item, anajob): path = os.path.join(loc, item) if item in ['0anacron'] or item[0] == '.' or not access(path, X_OK): return job = self[0].new(command=path, user=anajob.user) job.set_comment('Anacron %s' % loc.split('.')[-1]) job.setall(anajob) return job # Files are direct, directories are listed (recursively) KNOWN_LOCATIONS = [ # Known linux locations (Debian, RedHat, etc) (UserSpool, '/var/spool/cron/crontabs/'), (SystemTab, '/etc/crontab'), (SystemTab, '/etc/cron.d/'), # Anacron digestion (we want to know more) (AnaCronTab, '/etc/cron.hourly'), (AnaCronTab, '/etc/cron.daily'), (AnaCronTab, '/etc/cron.weekly'), (AnaCronTab, '/etc/cron.monthly'), # Known MacOSX locations # None # Other (windows, bsd) # None ] class CronTabs(list): """Singleton dictionary of all detectable crontabs""" _all = None _self = None def __new__(cls, *args, **kw): if not cls._self: cls._self = super(CronTabs, cls).__new__(cls, *args, **kw) return cls._self def __init__(self): if not self: for loc in KNOWN_LOCATIONS: self.add(*loc) def add(self, cls, *args): for tab in cls(*args, tabs=self): self.append(tab) self._all = None @property def all(self): """Return a CronTab object with all jobs (read-only)""" if self._all is None: self._all = CronTab(user=False) for tab in self: for job in tab: if job.user is None: job.user = tab.user or 'unknown' self._all.append(job) return self._all