summaryrefslogtreecommitdiff
path: root/graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2019-09-21 18:45:22 +0000
committerKurt Jaeger <pi@FreeBSD.org>2019-09-21 18:45:22 +0000
commitafc03086202ce696e54c801d26c215310f4e2e31 (patch)
tree499d2ee3d97c9fc488cdeeaf3faf719b839a252f /graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py
parentNew port: sysutils/p5-File-Rename (diff)
New port: graphics/rapid-photo-downloader
Rapid Photo Downloader imports photos and videos from cameras, phones, memory cards and other devices at high speed. It can be configured to rename photos and videos with meaningful filenames you specify. It can also back up photos and videos as they are downloaded. It downloads from and backs up to multiple devices simultaneously. WWW: http://www.damonlynch.net/rapid/ PR: 240601 Submitted by: m.ne@gmx.net Reviewed by: koobs
Notes
Notes: svn path=/head/; revision=512533
Diffstat (limited to 'graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py')
-rw-r--r--graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py62
1 files changed, 62 insertions, 0 deletions
diff --git a/graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py b/graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py
new file mode 100644
index 000000000000..7d46505e0be9
--- /dev/null
+++ b/graphics/rapid-photo-downloader/files/patch-raphodo_utilities.py
@@ -0,0 +1,62 @@
+--- raphodo/utilities.py.orig 2019-08-18 03:58:11 UTC
++++ raphodo/utilities.py
+@@ -76,10 +76,11 @@ if arrow_version >= parse_version('0.14.3') and arrow_
+ # Linux specific code to ensure child processes exit when parent dies
+ # See http://stackoverflow.com/questions/19447603/
+ # how-to-kill-a-python-child-process-created-with-subprocess-check-output-when-t/
+-libc = ctypes.CDLL("libc.so.6")
++libc = ctypes.CDLL("libc.so.7")
+ def set_pdeathsig(sig = signal.SIGTERM):
+ def callable():
+- return libc.prctl(1, sig)
++ return 0
++ #return libc.procctl(0, 0, 11, sig)
+ return callable
+
+
+@@ -195,8 +196,8 @@ def show_errors():
+ # kilobytes, etc.
+ suffixes = [_('B'), _('KB'), _('MB'), _('GB'), _('TB'), _('PB'), _('EB'), _('ZB'), _('YB')]
+
+-def format_size_for_user(size_in_bytes: int,
+- zero_string: str='',
++def format_size_for_user(size_in_bytes: int,
++ zero_string: str='',
+ no_decimals: int=2) -> str:
+ r"""
+ Humanize display of bytes.
+@@ -382,12 +383,12 @@ def find_mount_point(path: str) -> str:
+ Find the mount point of a path
+ See:
+ http://stackoverflow.com/questions/4453602/how-to-find-the-mountpoint-a-file-resides-on
+-
++
+ >>> print(find_mount_point('/crazy/path'))
+ /
+-
+- :param path:
+- :return:
++
++ :param path:
++ :return:
+ """
+ path = os.path.realpath(path)
+ while not os.path.ismount(path):
+@@ -724,13 +725,13 @@ def _collect_duplicates(basenames, paths):
+
+ def make_path_end_snippets_unique(*paths) -> List[str]:
+ r"""
+- Make list of path ends unique given possible common path endings.
+-
+- A snippet starts from the end of the path, in extreme cases possibly up the path start.
++ Make list of path ends unique given possible common path endings.
+
++ A snippet starts from the end of the path, in extreme cases possibly up the path start.
++
+ :param paths: sequence of paths to generate unique end snippets for
+ :return: list of unique snippets
+-
++
+ >>> p0 = '/home/damon/photos'
+ >>> p1 = '/media/damon/backup1/photos'
+ >>> p2 = '/media/damon/backup2/photos'