124 if ext.lower() == ".url": |
124 if ext.lower() == ".url": |
125 path = os.path.join(directory, file) |
125 path = os.path.join(directory, file) |
126 try: |
126 try: |
127 with open(path, "r") as f: |
127 with open(path, "r") as f: |
128 contents = f.read() |
128 contents = f.read() |
129 except IOError: |
129 except OSError: |
130 continue |
130 continue |
131 url = "" |
131 url = "" |
132 for line in contents.splitlines(): |
132 for line in contents.splitlines(): |
133 if line.startswith("URL="): |
133 if line.startswith("URL="): |
134 url = line.replace("URL=", "") |
134 url = line.replace("URL=", "") |