Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH v2 0/1] send-error-report: Add --no-ssl to use http protocol
@ 2019-03-05  3:30 Robert Yang
  2019-03-05  3:30 ` [PATCH v2 1/1] " Robert Yang
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Yang @ 2019-03-05  3:30 UTC (permalink / raw)
  To: openembedded-core

* V2
  Use store_const as Ross suggested

* V1
  Initial version

The following changes since commit e37a1ecc292b684daa49f2da2e19e0aa975f0959:

  squashfs-tools: add PACKAGECONFIGs for all the tunables (2019-03-04 17:37:23 +0000)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/error
  http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/error

Robert Yang (1):
  send-error-report: Add --no-ssl to use http protocol

 scripts/send-error-report | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH v2 1/1] send-error-report: Add --no-ssl to use http protocol
  2019-03-05  3:30 [PATCH v2 0/1] send-error-report: Add --no-ssl to use http protocol Robert Yang
@ 2019-03-05  3:30 ` Robert Yang
  0 siblings, 0 replies; 2+ messages in thread
From: Robert Yang @ 2019-03-05  3:30 UTC (permalink / raw)
  To: openembedded-core

The script use https protocol by default, but the error-report-web server's
https connection may not work (e.g., doesn't work with python 2.7.6), so add an
option --no-ssl to make it use http.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
 scripts/send-error-report | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/scripts/send-error-report b/scripts/send-error-report
index 3528cf9..0ed7cc9 100755
--- a/scripts/send-error-report
+++ b/scripts/send-error-report
@@ -62,7 +62,7 @@ def edit_content(json_file_path):
 
 def prepare_data(args):
     # attempt to get the max_log_size from the server's settings
-    max_log_size = getPayloadLimit("https://"+args.server+"/ClientPost/JSON")
+    max_log_size = getPayloadLimit(args.protocol+args.server+"/ClientPost/JSON")
 
     if not os.path.isfile(args.error_file):
         log.error("No data file found.")
@@ -132,9 +132,9 @@ def send_data(data, args):
     headers={'Content-type': 'application/json', 'User-Agent': "send-error-report/"+version}
 
     if args.json:
-        url = "https://"+args.server+"/ClientPost/JSON/"
+        url = args.protocol+args.server+"/ClientPost/JSON/"
     else:
-        url = "https://"+args.server+"/ClientPost/"
+        url = args.protocol+args.server+"/ClientPost/"
 
     req = urllib.request.Request(url, data=data, headers=headers)
     try:
@@ -187,6 +187,11 @@ if __name__ == '__main__':
                            help="Return the result in json format, silences all other output",
                            action="store_true")
 
+    arg_parse.add_argument("--no-ssl",
+                           help="Use http instead of https protocol",
+                           dest="protocol",
+                           action="store_const", const="http://", default="https://")
+
 
 
     args = arg_parse.parse_args()
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-05  3:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-05  3:30 [PATCH v2 0/1] send-error-report: Add --no-ssl to use http protocol Robert Yang
2019-03-05  3:30 ` [PATCH v2 1/1] " Robert Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox