aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-06-17 21:32:53 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-06-17 21:32:53 +0300
commit7a1b85d4cf32656f301b29dbb71a2d08c4388d1c (patch)
tree4677f5944825fa61e95c5c95068354c73dbf2dc2 /pomu/util/str.py
parentCompleted package sanity checking (diff)
downloadpomu-7a1b85d4cf32656f301b29dbb71a2d08c4388d1c.tar.gz
pomu-7a1b85d4cf32656f301b29dbb71a2d08c4388d1c.tar.bz2
pomu-7a1b85d4cf32656f301b29dbb71a2d08c4388d1c.zip
major refactoring of pomu package source module
fixed Result::unwrap fixed several issues to make the portage package source module produce correct packages
Diffstat (limited to 'pomu/util/str.py')
-rw-r--r--pomu/util/str.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/pomu/util/str.py b/pomu/util/str.py
index 4fcd4ac..419425b 100644
--- a/pomu/util/str.py
+++ b/pomu/util/str.py
@@ -1,2 +1,5 @@
-def pivot(string, idx):
- return (string[:idx], string[idx:])
+def pivot(string, idx, keep_pivot=True):
+ if keep_pivot:
+ return (string[:idx], string[idx:])
+ else:
+ return (string[:idx], string[idx+1:])