Skip to content

Commit

Permalink
Merge pull request #1 from mohamedotnet/mohamedotnet-patch-1
Browse files Browse the repository at this point in the history
Update socli.py -line: 711
  • Loading branch information
knox root authored Aug 8, 2017
2 parents 251800f + 700538a commit 1ba20aa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions socli/socli.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,8 +707,15 @@ def userpage(userid):
rate = accepted / float(total_questions) * 100
print("\t\t Total Questions Asked: " + str(len(userprofile.questions.fetch())))
print('\t\t Accept rate is: %.2f%%.' % rate)
print('\nMost experienced on %s.' % userprofile.top_answer_tags.fetch()[0].tag_name)
print('Most curious about %s.' % userprofile.top_question_tags.fetch()[0].tag_name)
#check if the user have answers and questions or no.
if userprofile.top_answer_tags.fetch():
print('\nMost experienced on %s.' % userprofile.top_answer_tags.fetch()[0].tag_name)
else:
print("You have 0 answers")
if userprofile.top_question_tags.fetch():
print('Most curious about %s.' % userprofile.top_question_tags.fetch()[0].tag_name)
else:
print("You have 0 questions")
except urllib.error.URLError:
print_fail("Please check your internet connectivity...")
exit(1)
Expand Down

0 comments on commit 1ba20aa

Please sign in to comment.