summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2012-01-13 17:59:05 -0500
committerJason R. Coombs <jaraco@jaraco.com>2012-01-13 17:59:05 -0500
commit0737b7281e32b5c7c4fabed99365e71644ea2dda (patch)
treefc92fc5ec99e1298727c9d00097b28811ecd0546 /Python/import.c
parentfa93cf8e3ea4f34804932ffdf841173ed0f1d088 (diff)
downloadcpython-git-0737b7281e32b5c7c4fabed99365e71644ea2dda.tar.gz
Fix indentation
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/Python/import.c b/Python/import.c
index dd8710eb05..3fc975460a 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -116,28 +116,28 @@ static const struct filedescr _PyImport_StandardFiletab[] = {
#ifdef MS_WINDOWS
int isdir(char *path) {
- DWORD rv;
- /* see issue1293 and issue3677:
- * stat() on Windows doesn't recognise paths like
- * "e:\\shared\\" and "\\\\whiterab-c2znlh\\shared" as dirs.
- * Also reference issue6727:
- * stat() on Windows is broken and doesn't resolve symlinks properly.
- */
- rv = GetFileAttributesA(path);
- return rv != INVALID_FILE_ATTRIBUTES && rv & FILE_ATTRIBUTE_DIRECTORY;
+ DWORD rv;
+ /* see issue1293 and issue3677:
+ * stat() on Windows doesn't recognise paths like
+ * "e:\\shared\\" and "\\\\whiterab-c2znlh\\shared" as dirs.
+ * Also reference issue6727:
+ * stat() on Windows is broken and doesn't resolve symlinks properly.
+ */
+ rv = GetFileAttributesA(path);
+ return rv != INVALID_FILE_ATTRIBUTES && rv & FILE_ATTRIBUTE_DIRECTORY;
}
#else
#if HAVE_STAT
int isdir(char *path) {
struct stat statbuf;
- return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode);
+ return stat(path, &statbuf) == 0 && S_ISDIR(statbuf.st_mode);
}
#else
#ifdef RISCOS
/* with RISCOS, isdir is in unixstuff */
#else
int isdir(char *path) {
- return 0;
+ return 0;
}
#endif /* RISCOS */
#endif /* HAVE_STAT */
@@ -3200,11 +3200,11 @@ NullImporter_init(NullImporter *self, PyObject *args, PyObject *kwds)
PyErr_SetString(PyExc_ImportError, "empty pathname");
return -1;
} else {
- if(isdir(path)) {
- PyErr_SetString(PyExc_ImportError,
- "existing directory");
- return -1;
- }
+ if(isdir(path)) {
+ PyErr_SetString(PyExc_ImportError,
+ "existing directory");
+ return -1;
+ }
}
return 0;
}