Closed Bug 838579 Opened 11 years ago Closed 11 years ago

mozdevice - devicemanager.py bad indentation in findOpenPort

Categories

(Testing :: Mozbase, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bc, Unassigned)

Details

Attachments

(1 file)

Attached patch patchSplinter Review
I ran into this running multiple instances of Autophone's server on a single machine where port conflicts would not result in incrementing the port seed.

In findOpenPort the raise should be nested under the if seed condition. The way it reads now, findOpenPort raising an exception the first time it hits a problem such as an address in use.

                 except:
                     if seed > maxportnum:
                         print "Automation Error: Could not find open port after checking 5000 ports"
-                    raise
+                        raise
                 seed += 1
Attachment #710657 - Flags: review?(jmaher)
Comment on attachment 710657 [details] [diff] [review]
patch

Review of attachment 710657 [details] [diff] [review]:
-----------------------------------------------------------------

good find!
Attachment #710657 - Flags: review?(jmaher) → review+
pushed: https://github.com/mozilla/mozbase/commit/e7e5e8a602c386d99407eb2c0c1dd51ccab23fba 

Thanks for the patch, Bob!
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: