+ elif o == "-p":
+ if a == "":
+ profile = None
+ else:
+ profile = a
+if profile == "":
+ try:
+ profile = manga.profile.profile.last()
+ except KeyError:
+ profile = manga.profile.profile.byname("default")
+elif profile is not None:
+ profile = manga.profile.profile.byname(profile)