Skip to content

Commit

Permalink
Remove useless pop() due to new splitlines()
Browse files Browse the repository at this point in the history
  • Loading branch information
solevis committed Apr 26, 2013
1 parent f8f0686 commit d10adbd
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions pykgin/pykgin.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ def show_keep(self, command="show-keep"):
output = stdoutdata
# create a list which contain each packages
output_whole_list = output.splitlines()
# remove last element (due to the last \n)
output_whole_list.pop()
# create a new list in which package informations are separate
output_list = []
for pkg in output_whole_list:
Expand Down Expand Up @@ -226,8 +224,6 @@ def show_deps(self, package, command="show-deps"):
output = stdoutdata
# create a list which contain each packages
output_whole_list = output.splitlines()
# remove last element (due to the last \n)
output_whole_list.pop()
# check if the list is empty
if(len(output_whole_list) != 0):
# remove the first element (pkgin blabla)
Expand Down Expand Up @@ -272,8 +268,6 @@ def list(self, command="list"):
output = stdoutdata
# create a list which contain each packages
output_whole_list = output.splitlines()
# remove last element (due to the last \n)
output_whole_list.pop()
# create a new list in which package name and description are separate
output_list = []
for pkg in output_whole_list:
Expand Down Expand Up @@ -476,8 +470,6 @@ def show_category(self, category):
output = stdoutdata
# create a list which contain each packages
output_raw_list = output.splitlines()
# remove last element (due to the last \n)
output_raw_list.pop()
# extract packages informations
output_list = []
for pkg in output_raw_list:
Expand Down Expand Up @@ -511,8 +503,6 @@ def show_pkg_category(self, package):
output = stdoutdata
# create a list which contain each packages
output_raw_list = output.splitlines()
# remove last element (due to the last \n)
output_raw_list.pop()
# extract packages informations
output_list = []
for element in output_raw_list:
Expand All @@ -537,8 +527,6 @@ def show_all_categories(self):
output = stdoutdata
# create a list which contain each packages
output_list = output.splitlines()
# remove last element (due to the last \n)
output_list.pop()

return output_list

Expand All @@ -559,8 +547,6 @@ def pkg_content(self, package):
output = stdoutdata
# create a list which contain each packages
output_list = output.splitlines()
# remove last element (due to the last \n)
output_list.pop()

return output_list[2::]

Expand Down

0 comments on commit d10adbd

Please sign in to comment.