[elbe-devel] [PATCH 09/17] elbepack: dosunix: drop unused module
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Fri Jul 19 13:31:00 CEST 2024
This function is not used anymore, so delete it.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
debian/python3-elbe-common.install | 1 -
elbepack/dosunix.py | 28 ----------------------------
2 files changed, 29 deletions(-)
diff --git a/debian/python3-elbe-common.install b/debian/python3-elbe-common.install
index 2954d435e3e1..bcce462ed85d 100644
--- a/debian/python3-elbe-common.install
+++ b/debian/python3-elbe-common.install
@@ -15,7 +15,6 @@ usr/lib/python3.*/*-packages/elbepack/config.py
usr/lib/python3.*/*-packages/elbepack/debinstaller.py
usr/lib/python3.*/*-packages/elbepack/default-preseed.xml
usr/lib/python3.*/*-packages/elbepack/directories.py
-usr/lib/python3.*/*-packages/elbepack/dosunix.py
usr/lib/python3.*/*-packages/elbepack/efilesystem.py
usr/lib/python3.*/*-packages/elbepack/elbexml.py
usr/lib/python3.*/*-packages/elbepack/elbeproject.py
diff --git a/elbepack/dosunix.py b/elbepack/dosunix.py
deleted file mode 100644
index a5b80e287c4c..000000000000
--- a/elbepack/dosunix.py
+++ /dev/null
@@ -1,28 +0,0 @@
-# ELBE - Debian Based Embedded Rootfilesystem Builder
-# SPDX-License-Identifier: GPL-3.0-or-later
-# SPDX-FileCopyrightText: 2015-2022 Linutronix GmbH
-
-def dos2unix_str(d):
- return d.replace('\r\n', '\n')
-
-
-def unix2dos_str(d):
- d = d.replace('\n', '\r\n')
- d = d.replace('\r\r\n', '\r\n')
- return d
-
-
-def __rewrite(fn, rw_func):
- with open(fn, 'r+') as f:
- d = rw_func(f.read())
- f.seek(0)
- f.write(d)
- f.truncate()
-
-
-def dos2unix(fn):
- __rewrite(fn, dos2unix_str)
-
-
-def unix2dos(fn):
- __rewrite(fn, unix2dos_str)
--
2.45.2
More information about the elbe-devel
mailing list