Ottomata has submitted this change and it was merged.

Change subject: Don't attempt to access .__doc__ if it isn't set, e.g. if -OO 
is given to python
......................................................................


Don't attempt to access .__doc__ if it isn't set, e.g. if -OO is given to python

Change-Id: I5c390b965ab364eebc92140eb21ccf23fc61e961
---
M bin/eventlogging-service
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Ottomata: Verified; Looks good to me, approved



diff --git a/bin/eventlogging-service b/bin/eventlogging-service
index 85553d3..7b7c66a 100755
--- a/bin/eventlogging-service
+++ b/bin/eventlogging-service
@@ -10,9 +10,13 @@
 from eventlogging import EventLoggingService
 from eventlogging import init_schema_cache, init_topic_config, setup_logging
 
+if EventLoggingService.__doc__:
+    argparse_doc = EventLoggingService.__doc__
+else:
+    argparse_doc=''
 
 ap = argparse.ArgumentParser(
-    description=textwrap.dedent(EventLoggingService.__doc__),
+    description=textwrap.dedent(argparse_doc),
     formatter_class=argparse.RawTextHelpFormatter,
     fromfile_prefix_chars='@'
 )

-- 
To view, visit https://gerrit.wikimedia.org/r/253676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c390b965ab364eebc92140eb21ccf23fc61e961
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: service
Gerrit-Owner: Ottomata <[email protected]>
Gerrit-Reviewer: Ottomata <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to